public class GrantAuthorizer extends Object implements Authorizer
This Authorizer
implementation grants permission
for a set of operations defined at construction time.
If the operation does not match, it ignores the authorization request.
Authorizer.Operation, Authorizer.Result
Modifier and Type | Field and Description |
---|---|
static GrantAuthorizer |
GRANT_ALL
Grants
Operation#CREATE , Operation#SUBSCRIBE and Operation#PUBLISH authorization |
static GrantAuthorizer |
GRANT_CREATE
Grants
Operation#CREATE authorization |
static GrantAuthorizer |
GRANT_CREATE_SUBSCRIBE
Grants
Operation#CREATE and Operation#SUBSCRIBE authorization |
static GrantAuthorizer |
GRANT_NONE
Grants no authorization, the authorization request is ignored
|
static GrantAuthorizer |
GRANT_PUBLISH
Grants
Operation#PUBLISH authorization |
static GrantAuthorizer |
GRANT_SUBSCRIBE
Grants
Operation#SUBSCRIBE authorization |
static GrantAuthorizer |
GRANT_SUBSCRIBE_PUBLISH
Grants
Operation#SUBSCRIBE and Operation#PUBLISH authorization |
Modifier and Type | Method and Description |
---|---|
Authorizer.Result |
authorize(Authorizer.Operation operation,
ChannelId channel,
ServerSession session,
ServerMessage message)
Blocking version of
Authorizer.authorize(Operation, ChannelId, ServerSession, ServerMessage, Promise) . |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
authorize
public static final GrantAuthorizer GRANT_CREATE
Operation#CREATE
authorizationpublic static final GrantAuthorizer GRANT_SUBSCRIBE
Operation#SUBSCRIBE
authorizationpublic static final GrantAuthorizer GRANT_PUBLISH
Operation#PUBLISH
authorizationpublic static final GrantAuthorizer GRANT_CREATE_SUBSCRIBE
Operation#CREATE
and Operation#SUBSCRIBE
authorizationpublic static final GrantAuthorizer GRANT_SUBSCRIBE_PUBLISH
Operation#SUBSCRIBE
and Operation#PUBLISH
authorizationpublic static final GrantAuthorizer GRANT_ALL
Operation#CREATE
, Operation#SUBSCRIBE
and Operation#PUBLISH
authorizationpublic static final GrantAuthorizer GRANT_NONE
public Authorizer.Result authorize(Authorizer.Operation operation, ChannelId channel, ServerSession session, ServerMessage message)
Authorizer
Blocking version of Authorizer.authorize(Operation, ChannelId, ServerSession, ServerMessage, Promise)
.
authorize
in interface Authorizer
operation
- the operation to authorizechannel
- the channel for which the authorization has been requestedsession
- the session that is requesting the authorizationmessage
- the message that triggered the authorization requestCopyright © 2008–2024 The CometD Project. All rights reserved.