From c14e3d8b343e6a6e2e00c9d39e32631c45f43ec3 Mon Sep 17 00:00:00 2001 From: Mihai Todor Date: Mon, 16 Mar 2020 02:00:23 +0000 Subject: [PATCH] Make IDP_PROVIDER env var mandatory (#536) --- authenticate/authenticate.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/authenticate/authenticate.go b/authenticate/authenticate.go index 45b107d42..9d9d231cb 100644 --- a/authenticate/authenticate.go +++ b/authenticate/authenticate.go @@ -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") }