public class PermissionResource extends Object
| Constructor and Description |
|---|
PermissionResource(Http http,
ServerConfiguration serverConfiguration,
TokenCallable pat) |
| Modifier and Type | Method and Description |
|---|---|
PermissionResponse |
create(List<PermissionRequest> requests)
Creates a new permission ticket for a set of one or more resource and scope(s).
|
PermissionResponse |
create(PermissionRequest request)
Creates a new permission ticket for a single resource and scope(s).
|
PermissionTicketRepresentation |
create(PermissionTicketRepresentation ticket)
Creates a new uma permission for a single resource and scope(s).
|
void |
delete(String ticketId)
Deletes a permission ticket by ID.
|
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.
|
List<PermissionTicketRepresentation> |
findByResource(String resourceId)
Query the server for any permission ticket associated with the given
resourceId. |
List<PermissionTicketRepresentation> |
findByScope(String scopeId)
Query the server for any permission ticket associated with the given
scopeId. |
PermissionResponse |
forResource(PermissionRequest request)
Deprecated.
|
void |
update(PermissionTicketRepresentation ticket)
Updates a permission ticket.
|
public PermissionResource(Http http, ServerConfiguration serverConfiguration, TokenCallable pat)
@Deprecated public PermissionResponse forResource(PermissionRequest request)
create(PermissionRequest)request - public PermissionResponse create(PermissionRequest request)
request - the PermissionRequest representing the resource and scope(s) (not null)public PermissionResponse create(List<PermissionRequest> requests)
requests - the PermissionRequest representing the resource and scope(s) (not null)public PermissionTicketRepresentation create(PermissionTicketRepresentation ticket)
ticket - the PermissionTicketRepresentation representing the resource and scope(s) (not null)public List<PermissionTicketRepresentation> findByScope(String scopeId)
scopeId.scopeId - the scope id (not null)scopeIdpublic List<PermissionTicketRepresentation> findByResource(String resourceId)
resourceId.resourceId - the resource id (not null)resourceIdpublic List<PermissionTicketRepresentation> find(String resourceId, String scopeId, String owner, String requester, Boolean granted, Boolean returnNames, Integer firstResult, Integer maxResult)
resourceId - the resource id or namescopeId - the scope id or nameowner - the owner id or namerequester - the requester id or namegranted - if true, only permission tickets marked as granted are returned.returnNames - if the response should include names for resource, scope and ownerfirstResult - the position of the first resource to retrievemaxResult - the maximum number of resources to retrievepublic void update(PermissionTicketRepresentation ticket)
ticket - the permission ticketpublic void delete(String ticketId)
ticketId - the permission ticket IDCopyright © 2021 JBoss by Red Hat. All rights reserved.