maintain backwards compatability for default oidc scope variable
This commit is contained in:
parent
3d0cd1ccb5
commit
027342e117
@ -103,10 +103,17 @@ func NewOidcAuthSetter(baseCfg BaseConfig, cfg OidcClientConfig) *OidcAuthProvid
|
||||
eps[k] = []string{v}
|
||||
}
|
||||
|
||||
// Previous versions hardcoded the scope to audience,
|
||||
// so for backwards compatability, use that if no scope is set
|
||||
scope := cfg.OidcAudience
|
||||
if cfg.OidcScope != "" {
|
||||
scope = cfg.OidcScope
|
||||
}
|
||||
|
||||
tokenGenerator := &clientcredentials.Config{
|
||||
ClientID: cfg.OidcClientID,
|
||||
ClientSecret: cfg.OidcClientSecret,
|
||||
Scopes: []string{cfg.OidcScope},
|
||||
Scopes: []string{scope},
|
||||
TokenURL: cfg.OidcTokenEndpointURL,
|
||||
EndpointParams: eps,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user