@FunctionalInterface public interface AuthorisationService
AuthorisationServiceSupplier| Modifier and Type | Field and Description |
|---|---|
static AuthorisationService |
ALLOW_ALL
An
AuthorisationService instance that allows every action. |
static AuthorisationService |
DENY_ALL
An
AuthorisationService instance that forbids all actions. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isAuthorised(int protocolId,
int actionId,
Object type,
byte[] encodedPrincipal)
Checks if the client with authenticated credentials is allowed to perform an operation indicated by the
given
actionId. |
static final AuthorisationService ALLOW_ALL
AuthorisationService instance that allows every action.static final AuthorisationService DENY_ALL
AuthorisationService instance that forbids all actions.boolean isAuthorised(int protocolId,
int actionId,
Object type,
byte[] encodedPrincipal)
actionId.protocolId - of the protocol to which the action belongs, e.g. a SBE schema id.actionId - of the command being checked, e.g. a SBE message template id.type - optional type for the command being checked, may be null. For example for
an admin request in the cluster it will contain AdminRequestType value which
denotes the exact kind of the request.encodedPrincipal - that has been authenticated.true if the client is authorised to execute the action or false otherwise.Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.