You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-08-10 22:51:31 +02:00
Extract roles from Keycloak Access Tokens
This commit is contained in:
@@ -275,12 +275,13 @@ func parseProviderInfo(o *options.Options, msgs []string) []string {
|
||||
|
||||
// Backwards compatibility with `--keycloak-group` option
|
||||
if len(o.KeycloakGroups) > 0 {
|
||||
// Maybe already added with proper `--allowed-group` flag
|
||||
// Maybe already added with `--allowed-group` flag
|
||||
if !strings.Contains(o.Scope, " groups") {
|
||||
o.Scope += " groups"
|
||||
}
|
||||
p.SetAllowedGroups(o.KeycloakGroups)
|
||||
}
|
||||
p.AddAllowedRoles(o.KeycloakRoles)
|
||||
case *providers.GoogleProvider:
|
||||
if o.GoogleServiceAccountJSON != "" {
|
||||
file, err := os.Open(o.GoogleServiceAccountJSON)
|
||||
|
Reference in New Issue
Block a user