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
Modifier and TypeFieldDescriptionstatic final GrantAuthorizer
GrantsAuthorizer.Operation.CREATE
,Authorizer.Operation.SUBSCRIBE
andAuthorizer.Operation.PUBLISH
authorizationstatic final GrantAuthorizer
GrantsAuthorizer.Operation.CREATE
authorizationstatic final GrantAuthorizer
GrantsAuthorizer.Operation.CREATE
andAuthorizer.Operation.SUBSCRIBE
authorizationstatic final GrantAuthorizer
Grants no authorization, the authorization request is ignoredstatic final GrantAuthorizer
GrantsAuthorizer.Operation.PUBLISH
authorizationstatic final GrantAuthorizer
GrantsAuthorizer.Operation.SUBSCRIBE
authorizationstatic final GrantAuthorizer
GrantsAuthorizer.Operation.SUBSCRIBE
andAuthorizer.Operation.PUBLISH
authorization -
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, wait
Methods inherited from interface org.cometd.bayeux.server.Authorizer
authorize
-
Field Details
-
GRANT_CREATE
GrantsAuthorizer.Operation.CREATE
authorization -
GRANT_SUBSCRIBE
GrantsAuthorizer.Operation.SUBSCRIBE
authorization -
GRANT_PUBLISH
GrantsAuthorizer.Operation.PUBLISH
authorization -
GRANT_CREATE_SUBSCRIBE
GrantsAuthorizer.Operation.CREATE
andAuthorizer.Operation.SUBSCRIBE
authorization -
GRANT_SUBSCRIBE_PUBLISH
GrantsAuthorizer.Operation.SUBSCRIBE
andAuthorizer.Operation.PUBLISH
authorization -
GRANT_ALL
GrantsAuthorizer.Operation.CREATE
,Authorizer.Operation.SUBSCRIBE
andAuthorizer.Operation.PUBLISH
authorization -
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:Authorizer
Blocking version of
Authorizer.authorize(Operation, ChannelId, ServerSession, ServerMessage, Promise)
.- Specified by:
authorize
in 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
-