Class ResourceService
- java.lang.Object
-
- org.keycloak.services.resources.account.resources.AbstractResourceService
-
- org.keycloak.services.resources.account.resources.ResourceService
-
public class ResourceService extends AbstractResourceService
- 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<AbstractResourceService.Permission>
getPermissionRequests()
Returns a list ofAbstractResourceService.Permission
requests waiting for theuser(java.lang.String)
approval.AbstractResourceService.Resource
getResource()
Returns aAbstractResourceService.Resource
where theuser(java.lang.String)
is the resource owner.javax.ws.rs.core.Response
revoke(List<AbstractResourceService.Permission> permissions)
Updates the permission set for a resource based on the givenpermissions
.Collection<AbstractResourceService.Permission>
toPermissions()
Returns a list ofAbstractResourceService.Permission
containing the users to which theuser(java.lang.String)
granted access to a resource.javax.ws.rs.core.Response
user(String value)
-
-
-
Method Detail
-
getResource
@GET @Produces("application/json") public AbstractResourceService.Resource 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 javax.ws.rs.core.Response user(@QueryParam("value") String value)
-
revoke
@PUT @Path("permissions") @Consumes("application/json") @Produces("application/json") public javax.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
-
-