Class PermissionResource
java.lang.Object
org.keycloak.authorization.client.resource.PermissionResource
An entry point for managing permission tickets using the Protection API.
- Author:
- Pedro Igor
- 
Constructor SummaryConstructorsConstructorDescriptionPermissionResource(Http http, ServerConfiguration serverConfiguration, TokenCallable pat) 
- 
Method SummaryModifier and TypeMethodDescriptioncount(String resourceId, String scopeId, String owner, String requester, Boolean granted, Boolean returnNames) create(List<PermissionRequest> requests) Creates a new permission ticket for a set of one or more resource and scope(s).create(PermissionRequest request) Creates a new permission ticket for a single resource and scope(s).create(PermissionTicketRepresentation ticket) Creates a new uma permission for a single resource and scope(s).voidDeletes a permission ticket by ID.find(String resourceId, String scopeId, String owner, String requester, Boolean granted, Boolean returnNames, Integer firstResult, Integer maxResult) Query the server for any permission ticket with the matching arguments.findByResource(String resourceId) Query the server for any permission ticket associated with the givenresourceId.findByScope(String scopeId) Query the server for any permission ticket associated with the givenscopeId.forResource(PermissionRequest request) Deprecated.voidupdate(PermissionTicketRepresentation ticket) Updates a permission ticket.
- 
Constructor Details- 
PermissionResource
 
- 
- 
Method Details- 
forResourceDeprecated.- Parameters:
- request-
- Returns:
 
- 
count
- 
createCreates a new permission ticket for a single resource and scope(s).- Parameters:
- request- the- PermissionRequestrepresenting the resource and scope(s) (not- null)
- Returns:
- a permission response holding a permission ticket with the requested permissions
 
- 
createCreates a new permission ticket for a set of one or more resource and scope(s).- Parameters:
- requests- the- PermissionRequestrepresenting the resource and scope(s) (not- null)
- Returns:
- a permission response holding a permission ticket with the requested permissions
 
- 
createCreates a new uma permission for a single resource and scope(s).- Parameters:
- ticket- the- PermissionTicketRepresentationrepresenting the resource and scope(s) (not- null)
- Returns:
- a permission response holding the permission ticket representation
 
- 
findByScopeQuery the server for any permission ticket associated with the givenscopeId.- Parameters:
- scopeId- the scope id (not- null)
- Returns:
- a list of permission tickets associated with the given scopeId
 
- 
findByResourceQuery the server for any permission ticket associated with the givenresourceId.- Parameters:
- resourceId- the resource id (not- null)
- Returns:
- a list of permission tickets associated with the given resourceId
 
- 
findpublic List<PermissionTicketRepresentation> find(String resourceId, String scopeId, String owner, String requester, Boolean granted, Boolean returnNames, Integer firstResult, Integer maxResult) Query the server for any permission ticket with the matching arguments.- Parameters:
- resourceId- the resource id or name
- scopeId- the scope id or name
- owner- the owner id or name
- requester- the requester id or name
- granted- if true, only permission tickets marked as granted are returned.
- returnNames- if the response should include names for resource, scope and owner
- firstResult- the position of the first resource to retrieve
- maxResult- the maximum number of resources to retrieve
- Returns:
- a list of permission tickets with the matching arguments
 
- 
updateUpdates a permission ticket.- Parameters:
- ticket- the permission ticket
 
- 
deleteDeletes a permission ticket by ID.- Parameters:
- ticketId- the permission ticket ID
 
 
- 
create(PermissionRequest)