Class ClientRoleMappingsResource
java.lang.Object
org.keycloak.services.resources.admin.ClientRoleMappingsResource
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Field Summary
Modifier and TypeFieldDescriptionprotected AdminEventBuilder
protected AdminPermissionEvaluator
protected ClientModel
protected static final org.jboss.logging.Logger
protected RealmModel
protected KeycloakSession
protected RoleMapperModel
-
Constructor Summary
ConstructorDescriptionClientRoleMappingsResource
(jakarta.ws.rs.core.UriInfo uriInfo, KeycloakSession session, RealmModel realm, AdminPermissionEvaluator auth, RoleMapperModel user, ClientModel client, AdminEventBuilder adminEvent, AdminPermissionEvaluator.RequirePermissionCheck manageCheck, AdminPermissionEvaluator.RequirePermissionCheck viewCheck) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add client-level roles to the user or group role mappingvoid
Delete client-level roles from user or group role mappingGet available client-level roles that can be mapped to the user or groupGet client-level role mappings for the user, and the appgetCompositeClientRoleMappings
(boolean briefRepresentation) Get effective client-level role mappings This recurses any composite roles
-
Field Details
-
logger
protected static final org.jboss.logging.Logger logger -
session
-
realm
-
auth
-
user
-
client
-
adminEvent
-
managePermission
-
viewPermission
-
-
Constructor Details
-
ClientRoleMappingsResource
public ClientRoleMappingsResource(jakarta.ws.rs.core.UriInfo uriInfo, KeycloakSession session, RealmModel realm, AdminPermissionEvaluator auth, RoleMapperModel user, ClientModel client, AdminEventBuilder adminEvent, AdminPermissionEvaluator.RequirePermissionCheck manageCheck, AdminPermissionEvaluator.RequirePermissionCheck viewCheck)
-
-
Method Details
-
getClientRoleMappings
Get client-level role mappings for the user, and the app- Returns:
-
getCompositeClientRoleMappings
@Path("composite") @GET @Produces("application/json") public Stream<RoleRepresentation> getCompositeClientRoleMappings(@QueryParam("briefRepresentation") @DefaultValue("true") boolean briefRepresentation) Get effective client-level role mappings This recurses any composite roles- Parameters:
briefRepresentation
- if false, return roles with their attributes- Returns:
-
getAvailableClientRoleMappings
@Path("available") @GET @Produces("application/json") public Stream<RoleRepresentation> getAvailableClientRoleMappings()Get available client-level roles that can be mapped to the user or group- Returns:
-
addClientRoleMapping
@POST @Consumes("application/json") public void addClientRoleMapping(List<RoleRepresentation> roles) Add client-level roles to the user or group role mapping- Parameters:
roles
-
-
deleteClientRoleMapping
@DELETE @Consumes("application/json") public void deleteClientRoleMapping(List<RoleRepresentation> roles) Delete client-level roles from user or group role mapping- Parameters:
roles
-
-