Make IDP_PROVIDER env var mandatory (#536)

This commit is contained in:
Mihai Todor 2020-03-16 02:00:23 +00:00 committed by GitHub
parent 1b8db111f5
commit c14e3d8b34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,6 +39,9 @@ func ValidateOptions(o config.Options) error {
if err := urlutil.ValidateURL(o.AuthenticateURL); err != nil {
return fmt.Errorf("authenticate: invalid 'AUTHENTICATE_SERVICE_URL': %w", err)
}
if o.Provider == "" {
return errors.New("authenticate: 'IDP_PROVIDER' is required")
}
if o.ClientID == "" {
return errors.New("authenticate: 'IDP_CLIENT_ID' is required")
}