Class RoleMapperResource

java.lang.Object
org.keycloak.services.resources.admin.RoleMapperResource

public class RoleMapperResource extends Object
Base resource for managing users
Version:
$Revision: 1 $
Author:
Bill Burke, Miguel P. Nunes
  • Field Details

  • Constructor Details

  • Method Details

    • getRoleMappings

      @GET @Produces("application/json") public org.keycloak.representations.idm.MappingsRepresentation getRoleMappings()
      Get role mappings
      Returns:
    • getRealmRoleMappings

      @Path("realm") @GET @Produces("application/json") public Stream<org.keycloak.representations.idm.RoleRepresentation> getRealmRoleMappings()
      Get realm-level role mappings
      Returns:
    • getCompositeRealmRoleMappings

      @Path("realm/composite") @GET @Produces("application/json") public Stream<org.keycloak.representations.idm.RoleRepresentation> getCompositeRealmRoleMappings(@QueryParam("briefRepresentation") @DefaultValue("true") boolean briefRepresentation)
      Get effective realm-level role mappings This will recurse all composite roles to get the result.
      Parameters:
      briefRepresentation - if false, return roles with their attributes
      Returns:
    • getAvailableRealmRoleMappings

      @Path("realm/available") @GET @Produces("application/json") public Stream<org.keycloak.representations.idm.RoleRepresentation> getAvailableRealmRoleMappings()
      Get realm-level roles that can be mapped
      Returns:
    • addRealmRoleMappings

      @Path("realm") @POST @Consumes("application/json") public void addRealmRoleMappings(List<org.keycloak.representations.idm.RoleRepresentation> roles)
      Add realm-level role mappings to the user
      Parameters:
      roles - Roles to add
    • deleteRealmRoleMappings

      @Path("realm") @DELETE @Consumes("application/json") public void deleteRealmRoleMappings(List<org.keycloak.representations.idm.RoleRepresentation> roles)
      Delete realm-level role mappings
      Parameters:
      roles -
    • getUserClientRoleMappingsResource

      @Path("clients/{client-id}") public ClientRoleMappingsResource getUserClientRoleMappingsResource(@PathParam("client-id") String client)