Package io.phasetwo.service.resource
Class RoleResource
java.lang.Object
io.phasetwo.service.resource.AbstractAdminResource<OrganizationAdminAuth>
io.phasetwo.service.resource.OrganizationAdminResource
io.phasetwo.service.resource.RoleResource
-
Field Summary
Fields inherited from class io.phasetwo.service.resource.OrganizationAdminResource
em, orgs
Fields inherited from class io.phasetwo.service.resource.AbstractAdminResource
adminEvent, adminRealm, auth, connection, headers, permissions, realm, session, user
-
Constructor Summary
ConstructorDescriptionRoleResource
(OrganizationAdminResource parent, OrganizationModel organization, String name, Consumer<String> deleteOrganizationRole) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
getRole()
jakarta.ws.rs.core.Response
grantUserRole
(String userId) jakarta.ws.rs.core.Response
revokeUserRole
(String userId) jakarta.ws.rs.core.Response
updateRole
(OrganizationRole representation) jakarta.ws.rs.core.Response
userHasRole
(String userId) Stream
<org.keycloak.representations.idm.UserRepresentation> users()
Methods inherited from class io.phasetwo.service.resource.OrganizationAdminResource
getServerUrl, init
Methods inherited from class io.phasetwo.service.resource.AbstractAdminResource
setup
-
Constructor Details
-
RoleResource
public RoleResource(OrganizationAdminResource parent, OrganizationModel organization, String name, Consumer<String> deleteOrganizationRole)
-
-
Method Details
-
getRole
-
updateRole
@PUT @Consumes("application/json") public jakarta.ws.rs.core.Response updateRole(OrganizationRole representation) -
deleteRole
@DELETE public jakarta.ws.rs.core.Response deleteRole() -
users
@GET @Path("users") @Produces("application/json") public Stream<org.keycloak.representations.idm.UserRepresentation> users() -
userHasRole
@GET @Path("users/{userId}") @Produces("application/json") public jakarta.ws.rs.core.Response userHasRole(@PathParam("userId") String userId) -
grantUserRole
@PUT @Path("users/{userId}") @Produces("application/json") public jakarta.ws.rs.core.Response grantUserRole(@PathParam("userId") String userId) -
revokeUserRole
@DELETE @Path("users/{userId}") @Produces("application/json") public jakarta.ws.rs.core.Response revokeUserRole(@PathParam("userId") String userId)
-