Class ResourceService
java.lang.Object
org.keycloak.services.resources.account.resources.AbstractResourceService
org.keycloak.services.resources.account.resources.ResourceService
- Author:
- Pedro Igor
-
Nested Class Summary
Nested classes/interfaces inherited from class org.keycloak.services.resources.account.resources.AbstractResourceService
AbstractResourceService.Client, AbstractResourceService.Permission, AbstractResourceService.Resource, AbstractResourceService.ResourcePermission, AbstractResourceService.Scope
-
Field Summary
Fields inherited from class org.keycloak.services.resources.account.resources.AbstractResourceService
auth, provider, request, resourceStore, scopeStore, ticketStore, uriInfo, user
-
Method Summary
Modifier and TypeMethodDescriptionReturns a list ofAbstractResourceService.Permission
requests waiting for theuser(java.lang.String)
approval.Returns aAbstractResourceService.Resource
where theuser(java.lang.String)
is the resource owner.jakarta.ws.rs.core.Response
revoke
(List<AbstractResourceService.Permission> permissions) Updates the permission set for a resource based on the givenpermissions
.Returns a list ofAbstractResourceService.Permission
containing the users to which theuser(java.lang.String)
granted access to a resource.jakarta.ws.rs.core.Response
-
Method Details
-
getResource
Returns aAbstractResourceService.Resource
where theuser(java.lang.String)
is the resource owner.- Returns:
- the resource
-
toPermissions
@GET @Path("permissions") @Produces("application/json") public Collection<AbstractResourceService.Permission> toPermissions()Returns a list ofAbstractResourceService.Permission
containing the users to which theuser(java.lang.String)
granted access to a resource.- Returns:
- the users with access to a resource
-
user
@GET @Path("user") @Produces("application/json") public jakarta.ws.rs.core.Response user(@QueryParam("value") String value) -
revoke
@PUT @Path("permissions") @Consumes("application/json") @Produces("application/json") public jakarta.ws.rs.core.Response revoke(List<AbstractResourceService.Permission> permissions) Updates the permission set for a resource based on the givenpermissions
.- Parameters:
permissions
- the permissions that should be updated- Returns:
- if successful, a
Response.Status.NO_CONTENT
response
-
getPermissionRequests
@GET @Path("permissions/requests") @Produces("application/json") public Collection<AbstractResourceService.Permission> getPermissionRequests()Returns a list ofAbstractResourceService.Permission
requests waiting for theuser(java.lang.String)
approval.- Returns:
- the permission requests waiting for the user approval
-