authorize: add databroker url check (#1228)

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
bobby 2020-08-07 09:31:27 -07:00 committed by GitHub
parent 02edbb7748
commit 1b365e52f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 23 deletions

View file

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