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 Summary
Fields Modifier and Type Field Description protected AdminEventBuilder
adminEvent
protected AdminPermissionEvaluator
auth
protected AdminPermissionEvaluator.RequirePermissionCheck
managePermission
protected RealmModel
realm
protected ScopeContainerModel
scopeContainer
protected KeycloakSession
session
protected AdminPermissionEvaluator.RequirePermissionCheck
viewPermission
-
Constructor Summary
Constructors Constructor Description ScopeMappedResource(RealmModel realm, AdminPermissionEvaluator auth, ScopeContainerModel scopeContainer, KeycloakSession session, AdminEventBuilder adminEvent, AdminPermissionEvaluator.RequirePermissionCheck managePermission, AdminPermissionEvaluator.RequirePermissionCheck viewPermission)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addRealmScopeMappings(List<RoleRepresentation> roles)
Add a set of realm-level roles to the client's scopevoid
deleteRealmScopeMappings(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 scopeScopeMappedClientResource
getClientByIdScopeMappings(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 scopeMappingsRepresentation
getScopeMappings()
Deprecated.the method is not used neither from admin console or from admin client.
-
-
-
Field Detail
-
realm
protected RealmModel realm
-
auth
protected AdminPermissionEvaluator auth
-
managePermission
protected AdminPermissionEvaluator.RequirePermissionCheck managePermission
-
viewPermission
protected AdminPermissionEvaluator.RequirePermissionCheck viewPermission
-
scopeContainer
protected ScopeContainerModel scopeContainer
-
session
protected KeycloakSession session
-
adminEvent
protected AdminEventBuilder adminEvent
-
-
Constructor Detail
-
ScopeMappedResource
public 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)
-
-