ginoidc/keycloakclaims/utils.go

11 lines
178 B
Go

package keycloakclaims
func RoleInRoles(role string, claims *Claims) bool {
for _, v := range claims.RealmAccess.Roles {
if role == v {
return true
}
}
return false
}