Class GrantAuthorizer
java.lang.Object
org.cometd.server.authorizer.GrantAuthorizer
- All Implemented Interfaces:
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cometd.bayeux.server.Authorizer
Authorizer.Operation, Authorizer.Result -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final GrantAuthorizerGrantsAuthorizer.Operation.CREATE,Authorizer.Operation.SUBSCRIBEandAuthorizer.Operation.PUBLISHauthorizationstatic final GrantAuthorizerGrantsAuthorizer.Operation.CREATEauthorizationstatic final GrantAuthorizerGrantsAuthorizer.Operation.CREATEandAuthorizer.Operation.SUBSCRIBEauthorizationstatic final GrantAuthorizerGrants no authorization, the authorization request is ignoredstatic final GrantAuthorizerGrantsAuthorizer.Operation.PUBLISHauthorizationstatic final GrantAuthorizerGrantsAuthorizer.Operation.SUBSCRIBEauthorizationstatic final GrantAuthorizerGrantsAuthorizer.Operation.SUBSCRIBEandAuthorizer.Operation.PUBLISHauthorization -
Method Summary
Modifier and TypeMethodDescriptionauthorize(Authorizer.Operation operation, ChannelId channel, ServerSession session, ServerMessage message) Blocking version ofAuthorizer.authorize(Operation, ChannelId, ServerSession, ServerMessage, Promise).toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.cometd.bayeux.server.Authorizer
authorize
-
Field Details
-
GRANT_CREATE
GrantsAuthorizer.Operation.CREATEauthorization -
GRANT_SUBSCRIBE
GrantsAuthorizer.Operation.SUBSCRIBEauthorization -
GRANT_PUBLISH
GrantsAuthorizer.Operation.PUBLISHauthorization -
GRANT_CREATE_SUBSCRIBE
GrantsAuthorizer.Operation.CREATEandAuthorizer.Operation.SUBSCRIBEauthorization -
GRANT_SUBSCRIBE_PUBLISH
GrantsAuthorizer.Operation.SUBSCRIBEandAuthorizer.Operation.PUBLISHauthorization -
GRANT_ALL
GrantsAuthorizer.Operation.CREATE,Authorizer.Operation.SUBSCRIBEandAuthorizer.Operation.PUBLISHauthorization -
GRANT_NONE
Grants no authorization, the authorization request is ignored
-
-
Method Details
-
authorize
public Authorizer.Result authorize(Authorizer.Operation operation, ChannelId channel, ServerSession session, ServerMessage message) Description copied from interface:AuthorizerBlocking version of
Authorizer.authorize(Operation, ChannelId, ServerSession, ServerMessage, Promise).- Specified by:
authorizein interfaceAuthorizer- Parameters:
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 request- Returns:
- the authorization result
-
toString
-