getAppURL will pull the request URL needed for fetching a user's Access token
(cmdArgs []string, log *zerolog.Logger)
| 465 | |
| 466 | // getAppURL will pull the request URL needed for fetching a user's Access token |
| 467 | func getAppURL(cmdArgs []string, log *zerolog.Logger) (*url.URL, error) { |
| 468 | if len(cmdArgs) < 1 { |
| 469 | log.Error().Msg("Please provide a valid URL as the first argument to curl.") |
| 470 | return nil, errors.New("not a valid url") |
| 471 | } |
| 472 | |
| 473 | u, err := processURL(cmdArgs[0]) |
| 474 | if err != nil { |
| 475 | log.Error().Msg("Please provide a valid URL as the first argument to curl.") |
| 476 | return nil, err |
| 477 | } |
| 478 | |
| 479 | return u, err |
| 480 | } |
| 481 | |
| 482 | // parseAllowRequest will parse cmdArgs and return a copy of the args and result |
| 483 | // of the allow request was present |
no test coverage detected