ginoidc/keycloakclaims/utils.go

11 lines
178 B
Go
Raw Normal View History

2021-11-28 16:25:58 +01:00
package keycloakclaims
func RoleInRoles(role string, claims *Claims) bool {
for _, v := range claims.RealmAccess.Roles {
if role == v {
return true
}
}
return false
}