Interface RoleResource
public interface RoleResource
- Author:
- rodrigo.sasaki@icarros.com.br
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddComposites(List<org.keycloak.representations.idm.RoleRepresentation> rolesToAdd) voiddeleteComposites(List<org.keycloak.representations.idm.RoleRepresentation> rolesToRemove) Set<org.keycloak.representations.idm.RoleRepresentation>getClientRoleComposites(String clientUuid) org.keycloak.representations.idm.ManagementPermissionReferenceReturns indicator if the fine grain permissions are enabled or not.Set<org.keycloak.representations.idm.RoleRepresentation>Set<org.keycloak.representations.idm.RoleRepresentation>Set<org.keycloak.representations.idm.GroupRepresentation>Get role groups.Set<org.keycloak.representations.idm.GroupRepresentation>getRoleGroupMembers(Integer firstResult, Integer maxResults) Get role groups.Set<org.keycloak.representations.idm.UserRepresentation>Deprecated.Set<org.keycloak.representations.idm.UserRepresentation>getRoleUserMembers(Integer firstResult, Integer maxResults) Deprecated.please usegetUserMembers(Integer, Integer)List<org.keycloak.representations.idm.UserRepresentation>Get role members.List<org.keycloak.representations.idm.UserRepresentation>getUserMembers(Boolean briefRepresentation, Integer firstResult, Integer maxResults) Get role members.List<org.keycloak.representations.idm.UserRepresentation>getUserMembers(Integer firstResult, Integer maxResults) Get role members.voidremove()org.keycloak.representations.idm.ManagementPermissionReferencesetPermissions(org.keycloak.representations.idm.ManagementPermissionRepresentation status) Enables or disables the fine grain permissions feature.org.keycloak.representations.idm.RoleRepresentationvoidupdate(org.keycloak.representations.idm.RoleRepresentation roleRepresentation)
-
Method Details
-
setPermissions
@PUT @Path("/management/permissions") @Consumes("application/json") @Produces("application/json") org.keycloak.representations.idm.ManagementPermissionReference setPermissions(org.keycloak.representations.idm.ManagementPermissionRepresentation status) Enables or disables the fine grain permissions feature. Returns the updated status of the server in theManagementPermissionReference.- Parameters:
status- status request to apply- Returns:
- permission reference indicating the updated status
-
getPermissions
@GET @Path("/management/permissions") @Produces("application/json") org.keycloak.representations.idm.ManagementPermissionReference getPermissions()Returns indicator if the fine grain permissions are enabled or not.- Returns:
- current representation of the permissions feature
-
toRepresentation
@GET @Produces("application/json") org.keycloak.representations.idm.RoleRepresentation toRepresentation() -
update
@PUT @Consumes("application/json") void update(org.keycloak.representations.idm.RoleRepresentation roleRepresentation) -
remove
@DELETE void remove() -
getRoleComposites
@GET @Path("composites") @Produces("application/json") Set<org.keycloak.representations.idm.RoleRepresentation> getRoleComposites() -
getRealmRoleComposites
@GET @Path("composites/realm") @Produces("application/json") Set<org.keycloak.representations.idm.RoleRepresentation> getRealmRoleComposites() -
getClientRoleComposites
-
addComposites
@POST @Path("composites") @Consumes("application/json") void addComposites(List<org.keycloak.representations.idm.RoleRepresentation> rolesToAdd) -
deleteComposites
@DELETE @Path("composites") @Consumes("application/json") void deleteComposites(List<org.keycloak.representations.idm.RoleRepresentation> rolesToRemove) -
getUserMembers
@GET @Path("users") @Produces("application/json") List<org.keycloak.representations.idm.UserRepresentation> getUserMembers()Get role members.Returns users that have the given role, sorted by username ascending.
Note: This method just returns the first 100 users. In order to retrieve all users, use paging (see
getUserMembers(Integer, Integer)).- Returns:
- a list of users with the given role
-
getUserMembers
@GET @Path("users") @Produces("application/json") List<org.keycloak.representations.idm.UserRepresentation> getUserMembers(@QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults) Get role members.Returns users that have the given role, sorted by username ascending, paginated according to the query parameters.
- Parameters:
firstResult- Pagination offsetmaxResults- Pagination size- Returns:
- a list of users with the given role
-
getUserMembers
@GET @Path("users") @Produces("application/json") List<org.keycloak.representations.idm.UserRepresentation> getUserMembers(@QueryParam("briefRepresentation") Boolean briefRepresentation, @QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults) Get role members.Returns users that have the given role, sorted by username ascending, paginated according to the query parameters.
- Parameters:
briefRepresentation- If the user should be returned in brief or full representation. Parameter available since Keycloak server 26. Will be ignored on older Keycloak versions with the default value false.firstResult- Pagination offsetmaxResults- Pagination size- Returns:
- a list of users with the given role
-
getRoleGroupMembers
@GET @Path("groups") @Produces("application/json") Set<org.keycloak.representations.idm.GroupRepresentation> getRoleGroupMembers()Get role groups.Returns groups that have the given role.
- Returns:
- a list of groups with the given role
-
getRoleGroupMembers
@GET @Path("groups") @Produces("application/json") Set<org.keycloak.representations.idm.GroupRepresentation> getRoleGroupMembers(@QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults) Get role groups.Returns groups that have the given role, paginated according to the query parameters.
- Parameters:
firstResult- Pagination offsetmaxResults- Pagination size- Returns:
- a list of groups with the given role
-
getRoleUserMembers
@GET @Path("users") @Produces("application/json") @Deprecated Set<org.keycloak.representations.idm.UserRepresentation> getRoleUserMembers()Deprecated.please usegetUserMembers()Get role members.Returns users that have the given role.
- Returns:
- a set of users with the given role
-
getRoleUserMembers
@GET @Path("users") @Produces("application/json") @Deprecated Set<org.keycloak.representations.idm.UserRepresentation> getRoleUserMembers(@QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults) Deprecated.please usegetUserMembers(Integer, Integer)Get role members.Returns users that have the given role, paginated according to the query parameters.
- Parameters:
firstResult- Pagination offsetmaxResults- Pagination size- Returns:
- a set of users with the given role
-
getUserMembers()