Closed shibumi closed 2 years ago
I could find the "FullScopeAllowed" variable in the Client Object, but I am still looking for a way to assign realm Roles and client Roles to a Client Scope.
I have to admit I am a little bit confused, because there are "Clients->Scopes" and "ClientScopes".
I tried setting the clientscope via filling the slice of interfaces with roles:
var scopeMappings []interface{}
for _, scopeMapping := range *r.ScopeMappings {
scopeMappings = append(scopeMappings, gocloak.Role{
Name: scopeMapping.name,
Composite: scopeMapping.Composite,
ClientRole: scopeMapping.ClientRole,
})
}
and then using this as: scopeMappings: &scopeMappings
, but this just produces an API error. There is no documentation for setting the Scopes. Any help? :(
Hi,
i guess the best solution is to check how the Keycloak frontend sets scopes, by doing it manually while checking DevTools in the browser. That may give a hint, what we are doing wrong
I fixed this. Instead of trying to writing the mappings directly into the realm I simply called these two methods here:
CreateClientScopeMappingsRealmRoles() CreateClientScopeMappingsClientRoles()
Hello,
How would I set these Scopes via the RealmRepresentation?