11 lines
178 B
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
|
||
|
}
|