public interface AuthorizationService
| Modifier and Type | Interface and Description |
|---|---|
static class |
AuthorizationService.Operation |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Resource> |
filter(java.util.List<Resource> input)
Filters a list of resources based on authorization rules.
|
java.util.Optional<Subject> |
getSubject()
Get the subject from the request made to the server.
|
boolean |
isAuthorizationAttributeValid(AuthorizationAttribute attribute)
Check whether an attribute is valid.
|
boolean |
isAuthorized(AuthorizationService.Operation operation,
Resource resource)
Check whether a caller, represented by a token, is authorized to perform an operation on a resource.
|
boolean isAuthorized(AuthorizationService.Operation operation, Resource resource) throws PluginException
operation - the operation (read, write, admin) to authorizeresource - the resource that the subject wants to perform an operation onPluginException - if an error occurred during executionboolean isAuthorizationAttributeValid(AuthorizationAttribute attribute) throws PluginException
attribute - the attribute to validatePluginException - if an error occurred during executionjava.util.List<Resource> filter(java.util.List<Resource> input) throws PluginException
input - the list to filterPluginException - if an error occurred during executionjava.util.Optional<Subject> getSubject() throws PluginException
PluginException - if an error occurred during execution