1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-08-10 22:51:31 +02:00

Rename KeycloakRoles to AllowedRoles

Also don't support backwards compatibility for legacy
flags in new provider.
This commit is contained in:
Nick Meves
2021-03-17 18:35:07 -07:00
parent 3bda10f005
commit b6cffb03d5
2 changed files with 3 additions and 12 deletions

View File

@@ -272,16 +272,7 @@ func parseProviderInfo(o *options.Options, msgs []string) []string {
if p.Verifier == nil {
msgs = append(msgs, "keycloak-oidc provider requires an oidc issuer URL")
}
// Backwards compatibility with `--keycloak-group` option
if len(o.KeycloakGroups) > 0 {
// Maybe already added with `--allowed-group` flag
if !strings.Contains(o.Scope, " groups") {
o.Scope += " groups"
}
p.SetAllowedGroups(o.KeycloakGroups)
}
p.AddAllowedRoles(o.KeycloakRoles)
p.AddAllowedRoles(o.AllowedRoles)
case *providers.GoogleProvider:
if o.GoogleServiceAccountJSON != "" {
file, err := os.Open(o.GoogleServiceAccountJSON)