Package org.cometd.server.authorizer
Class GrantAuthorizer
java.lang.Object
org.cometd.server.authorizer.GrantAuthorizer
- All Implemented Interfaces:
Authorizer
public class GrantAuthorizer extends java.lang.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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cometd.bayeux.server.Authorizer
Authorizer.Operation, Authorizer.Result
-
Field Summary
Fields Modifier and Type Field Description static GrantAuthorizer
GRANT_ALL
GrantsAuthorizer.Operation.CREATE
,Authorizer.Operation.SUBSCRIBE
andAuthorizer.Operation.PUBLISH
authorizationstatic GrantAuthorizer
GRANT_CREATE
GrantsAuthorizer.Operation.CREATE
authorizationstatic GrantAuthorizer
GRANT_CREATE_SUBSCRIBE
GrantsAuthorizer.Operation.CREATE
andAuthorizer.Operation.SUBSCRIBE
authorizationstatic GrantAuthorizer
GRANT_NONE
Grants no authorization, the authorization request is ignoredstatic GrantAuthorizer
GRANT_PUBLISH
GrantsAuthorizer.Operation.PUBLISH
authorizationstatic GrantAuthorizer
GRANT_SUBSCRIBE
GrantsAuthorizer.Operation.SUBSCRIBE
authorizationstatic GrantAuthorizer
GRANT_SUBSCRIBE_PUBLISH
GrantsAuthorizer.Operation.SUBSCRIBE
andAuthorizer.Operation.PUBLISH
authorization -
Method Summary
Modifier and Type Method Description Authorizer.Result
authorize(Authorizer.Operation operation, org.cometd.bayeux.ChannelId channel, ServerSession session, ServerMessage message)
java.lang.String
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, org.cometd.bayeux.ChannelId channel, ServerSession session, ServerMessage message)- Specified by:
authorize
in interfaceAuthorizer
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-