Class ScopeMappedClientResource
java.lang.Object
org.keycloak.services.resources.admin.ScopeMappedClientResource
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AdminEventBuilderprotected AdminPermissionEvaluatorprotected org.keycloak.models.RealmModelprotected org.keycloak.models.ScopeContainerModelprotected org.keycloak.models.ClientModelprotected org.keycloak.models.KeycloakSession -
Constructor Summary
ConstructorsConstructorDescriptionScopeMappedClientResource(org.keycloak.models.RealmModel realm, AdminPermissionEvaluator auth, org.keycloak.models.ScopeContainerModel scopeContainer, org.keycloak.models.KeycloakSession session, org.keycloak.models.ClientModel scopedClient, AdminEventBuilder adminEvent, AdminPermissionEvaluator.RequirePermissionCheck managePermission, AdminPermissionEvaluator.RequirePermissionCheck viewPermission) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClientScopeMapping(List<org.keycloak.representations.idm.RoleRepresentation> roles) Add client-level roles to the client's scopevoiddeleteClientScopeMapping(List<org.keycloak.representations.idm.RoleRepresentation> roles) Remove client-level roles from the client's scope.Stream<org.keycloak.representations.idm.RoleRepresentation>The available client-level roles Returns the roles for the client that can be associated with the client's scopeStream<org.keycloak.representations.idm.RoleRepresentation>Get the roles associated with a client's scope Returns roles for the client.Stream<org.keycloak.representations.idm.RoleRepresentation>getCompositeClientScopeMappings(boolean briefRepresentation) Get effective client roles Returns the roles for the client that are associated with the client's scope.
-
Field Details
-
realm
protected org.keycloak.models.RealmModel realm -
auth
-
managePermission
-
viewPermission
-
scopeContainer
protected org.keycloak.models.ScopeContainerModel scopeContainer -
session
protected org.keycloak.models.KeycloakSession session -
scopedClient
protected org.keycloak.models.ClientModel scopedClient -
adminEvent
-
-
Constructor Details
-
ScopeMappedClientResource
public ScopeMappedClientResource(org.keycloak.models.RealmModel realm, AdminPermissionEvaluator auth, org.keycloak.models.ScopeContainerModel scopeContainer, org.keycloak.models.KeycloakSession session, org.keycloak.models.ClientModel scopedClient, AdminEventBuilder adminEvent, AdminPermissionEvaluator.RequirePermissionCheck managePermission, AdminPermissionEvaluator.RequirePermissionCheck viewPermission)
-
-
Method Details
-
getClientScopeMappings
@GET @Produces("application/json") public Stream<org.keycloak.representations.idm.RoleRepresentation> getClientScopeMappings()Get the roles associated with a client's scope Returns roles for the client.- Returns:
-
getAvailableClientScopeMappings
@Path("available") @GET @Produces("application/json") public Stream<org.keycloak.representations.idm.RoleRepresentation> getAvailableClientScopeMappings()The available client-level roles Returns the roles for the client that can be associated with the client's scope- Returns:
-
getCompositeClientScopeMappings
@Path("composite") @GET @Produces("application/json") public Stream<org.keycloak.representations.idm.RoleRepresentation> getCompositeClientScopeMappings(@QueryParam("briefRepresentation") @DefaultValue("true") boolean briefRepresentation) Get effective client roles Returns the roles for the client that are associated with the client's scope.- Parameters:
briefRepresentation- if false, return roles with their attributes- Returns:
-
addClientScopeMapping
@POST @Consumes("application/json") public void addClientScopeMapping(List<org.keycloak.representations.idm.RoleRepresentation> roles) Add client-level roles to the client's scope- Parameters:
roles-
-
deleteClientScopeMapping
@DELETE @Consumes("application/json") public void deleteClientScopeMapping(List<org.keycloak.representations.idm.RoleRepresentation> roles) Remove client-level roles from the client's scope.- Parameters:
roles-
-