authenticate: ensure authorize url is set (#760)

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
Bobby DeSimone 2020-05-26 10:44:20 -07:00 committed by GitHub
parent f770ccfedd
commit 9d7ef85687
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View file

@ -55,6 +55,9 @@ func ValidateOptions(o config.Options) error {
if o.AuthenticateCallbackPath == "" {
return errors.New("authenticate: 'AUTHENTICATE_CALLBACK_PATH' is required")
}
if err := urlutil.ValidateURL(o.AuthorizeURL); err != nil {
return fmt.Errorf("authenticate: invalid 'AUTHORIZE_SERVICE_URL': %w", err)
}
return nil
}