Corrects OIDC group parsing in case userinfo_endpoint is not OIDC compliant

Signed-off-by: Vitor <vitor.barth@gmail.com>
This commit is contained in:
Vitor 2023-12-27 18:37:52 +00:00
parent e397e86478
commit 7b60ac90e3
1 changed files with 4 additions and 0 deletions

View File

@ -403,6 +403,10 @@ func groupsFromClaims(gp claimsProvider, k string) ([]string, bool) {
}
res = append(res, s)
}
// if remote.Groups is not a []string, but local.Groups is, this will create a fallback
if len(res) == 0 {
return res, false
}
return res, true
}