Class RoleMapperResource

    • Field Detail

      • logger

        protected static final org.jboss.logging.Logger logger
      • realm

        protected final org.keycloak.models.RealmModel realm
      • clientConnection

        protected final org.keycloak.common.ClientConnection clientConnection
      • session

        protected final org.keycloak.models.KeycloakSession session
      • headers

        protected final javax.ws.rs.core.HttpHeaders headers
    • Method Detail

      • 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}")
        public ClientRoleMappingsResource getUserClientRoleMappingsResource​(@PathParam("client")
                                                                            String client)