Class ScopeMappedResource
- java.lang.Object
- 
- org.keycloak.services.resources.admin.ScopeMappedResource
 
- 
 public class ScopeMappedResource extends Object Base class for managing the scope mappings of a specific client.- Version:
- $Revision: 1 $
- Author:
- Bill Burke
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected AdminEventBuilderadminEventprotected AdminPermissionEvaluatorauthprotected AdminPermissionEvaluator.RequirePermissionCheckmanagePermissionprotected RealmModelrealmprotected ScopeContainerModelscopeContainerprotected KeycloakSessionsessionprotected AdminPermissionEvaluator.RequirePermissionCheckviewPermission
 - 
Constructor SummaryConstructors Constructor Description ScopeMappedResource(RealmModel realm, AdminPermissionEvaluator auth, ScopeContainerModel scopeContainer, KeycloakSession session, AdminEventBuilder adminEvent, AdminPermissionEvaluator.RequirePermissionCheck managePermission, AdminPermissionEvaluator.RequirePermissionCheck viewPermission)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddRealmScopeMappings(List<RoleRepresentation> roles)Add a set of realm-level roles to the client's scopevoiddeleteRealmScopeMappings(List<RoleRepresentation> roles)Remove a set of realm-level roles from the client's scopeStream<RoleRepresentation>getAvailableRealmScopeMappings()Get realm-level roles that are available to attach to this client's scopeScopeMappedClientResourcegetClientByIdScopeMappings(String client)Stream<RoleRepresentation>getCompositeRealmScopeMappings(boolean briefRepresentation)Get effective realm-level roles associated with the client's scope What this does is recurse any composite roles associated with the client's scope and adds the roles to this lists.Stream<RoleRepresentation>getRealmScopeMappings()Get realm-level roles associated with the client's scopeMappingsRepresentationgetScopeMappings()Deprecated.the method is not used neither from admin console or from admin client.
 
- 
- 
- 
Field Detail- 
realmprotected RealmModel realm 
 - 
authprotected AdminPermissionEvaluator auth 
 - 
managePermissionprotected AdminPermissionEvaluator.RequirePermissionCheck managePermission 
 - 
viewPermissionprotected AdminPermissionEvaluator.RequirePermissionCheck viewPermission 
 - 
scopeContainerprotected ScopeContainerModel scopeContainer 
 - 
sessionprotected KeycloakSession session 
 - 
adminEventprotected AdminEventBuilder adminEvent 
 
- 
 - 
Constructor Detail- 
ScopeMappedResourcepublic ScopeMappedResource(RealmModel realm, AdminPermissionEvaluator auth, ScopeContainerModel scopeContainer, KeycloakSession session, AdminEventBuilder adminEvent, AdminPermissionEvaluator.RequirePermissionCheck managePermission, AdminPermissionEvaluator.RequirePermissionCheck viewPermission) 
 
- 
 - 
Method Detail- 
getScopeMappings@GET @Produces("application/json") @Deprecated public MappingsRepresentation getScopeMappings()Deprecated.the method is not used neither from admin console or from admin client. It may be removed in future releases.Get all scope mappings for the client- Returns:
 
 - 
getRealmScopeMappings@Path("realm") @GET @Produces("application/json") public Stream<RoleRepresentation> getRealmScopeMappings()Get realm-level roles associated with the client's scope- Returns:
 
 - 
getAvailableRealmScopeMappings@Path("realm/available") @GET @Produces("application/json") public Stream<RoleRepresentation> getAvailableRealmScopeMappings()Get realm-level roles that are available to attach to this client's scope- Returns:
 
 - 
getCompositeRealmScopeMappings@Path("realm/composite") @GET @Produces("application/json") public Stream<RoleRepresentation> getCompositeRealmScopeMappings(@QueryParam("briefRepresentation") @DefaultValue("true") boolean briefRepresentation)Get effective realm-level roles associated with the client's scope What this does is recurse any composite roles associated with the client's scope and adds the roles to this lists. The method is really to show a comprehensive total view of realm-level roles associated with the client.- Parameters:
- briefRepresentation- if false, return roles with their attributes
- Returns:
 
 - 
addRealmScopeMappings@Path("realm") @POST @Consumes("application/json") public void addRealmScopeMappings(List<RoleRepresentation> roles)Add a set of realm-level roles to the client's scope- Parameters:
- roles-
 
 - 
deleteRealmScopeMappings@Path("realm") @DELETE @Consumes("application/json") public void deleteRealmScopeMappings(List<RoleRepresentation> roles)Remove a set of realm-level roles from the client's scope- Parameters:
- roles-
 
 - 
getClientByIdScopeMappings@Path("clients/{client}") public ScopeMappedClientResource getClientByIdScopeMappings(@PathParam("client") String client)
 
- 
 
-