public interface AuthnrPermissionChecker
| Modifier and Type | Method and Description |
|---|---|
default void |
checkPermission(long targetResourceId,
String... actions)
Checks the permissions exactly the same way as the
hasPermission(long, String...) method, but it throws
an UnauthorizedException in case of permission check fails. |
long[] |
getAuthorizationScope()
Getting the resources that the current authenticated resource inherits the rights from.
|
long |
getSystemResourceId()
There must be only one system resource and it has permission to do everything.
|
boolean |
hasPermission(long targetResourceId,
String... actions)
Check whether the authenticated resource has the permission with the given parameters.
|
default void checkPermission(long targetResourceId,
String... actions)
hasPermission(long, String...) method, but it throws
an UnauthorizedException in case of permission check fails.targetResourceId - The id of the resource that the authorized resource may have permission on.actions - One or more actions. If multiple actions are provided, the function returns true if the authorized
resource can do any of the actions on the target. At least one action must be defined.UnauthorizedException - if there is no available permission or if target resource does not exist.NullPointerException - if action parameter is a null array or one of the actions is null.IllegalArgumentException - if a zero length array argument is passed for the action parameter.long[] getAuthorizationScope()
long getSystemResourceId()
boolean hasPermission(long targetResourceId,
String... actions)
targetResourceId - The id of the resource that the authorized resource may have permission on.actions - One or more actions. If multiple actions are provided, the function returns true if the authorized
resource can do any of the actions on the target. At least one action must be defined.true if there is available permission, false otherwise. The function returns
false if the authorized resource or target resource does not exist.NullPointerException - if action parameter is a null array or one of the actions is null.IllegalArgumentException - if a zero length array argument is passed for the action parameter.Copyright © 2011–2015 Everit Kft.. All rights reserved.