public class ClientRoleMappingsResource extends Object
Modifier and Type | Field and Description |
---|---|
protected AdminEventBuilder |
adminEvent |
protected RealmAuth |
auth |
protected ClientModel |
client |
protected static ServicesLogger |
logger |
protected RealmModel |
realm |
protected KeycloakSession |
session |
protected RoleMapperModel |
user |
Constructor and Description |
---|
ClientRoleMappingsResource(javax.ws.rs.core.UriInfo uriInfo,
KeycloakSession session,
RealmModel realm,
RealmAuth auth,
RoleMapperModel user,
ClientModel client,
AdminEventBuilder adminEvent) |
Modifier and Type | Method and Description |
---|---|
void |
addClientRoleMapping(List<RoleRepresentation> roles)
Add client-level roles to the user role mapping
|
void |
deleteClientRoleMapping(List<RoleRepresentation> roles)
Delete client-level roles from user role mapping
|
List<RoleRepresentation> |
getAvailableClientRoleMappings()
Get available client-level roles that can be mapped to the user
|
static List<RoleRepresentation> |
getAvailableRoles(RoleMapperModel mapper,
Set<RoleModel> available) |
List<RoleRepresentation> |
getClientRoleMappings()
Get client-level role mappings for the user, and the app
|
List<RoleRepresentation> |
getCompositeClientRoleMappings()
Get effective client-level role mappings
This recurses any composite roles
|
protected static final ServicesLogger logger
protected KeycloakSession session
protected RealmModel realm
protected RealmAuth auth
protected RoleMapperModel user
protected ClientModel client
protected AdminEventBuilder adminEvent
public ClientRoleMappingsResource(javax.ws.rs.core.UriInfo uriInfo, KeycloakSession session, RealmModel realm, RealmAuth auth, RoleMapperModel user, ClientModel client, AdminEventBuilder adminEvent)
@GET @Produces(value="application/json") public List<RoleRepresentation> getClientRoleMappings()
@Path(value="composite") @GET @Produces(value="application/json") public List<RoleRepresentation> getCompositeClientRoleMappings()
@Path(value="available") @GET @Produces(value="application/json") public List<RoleRepresentation> getAvailableClientRoleMappings()
public static List<RoleRepresentation> getAvailableRoles(RoleMapperModel mapper, Set<RoleModel> available)
@POST @Consumes(value="application/json") public void addClientRoleMapping(List<RoleRepresentation> roles)
roles
- @DELETE @Consumes(value="application/json") public void deleteClientRoleMapping(List<RoleRepresentation> roles)
roles
- Copyright © 2016 JBoss by Red Hat. All rights reserved.