Package org.cometd.server.authorizer
Class GrantAuthorizer
java.lang.Object
org.cometd.server.authorizer.GrantAuthorizer
- All Implemented Interfaces:
Authorizer
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.
-
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 GrantAuthorizerGRANT_ALLGrantsAuthorizer.Operation.CREATE,Authorizer.Operation.SUBSCRIBEandAuthorizer.Operation.PUBLISHauthorizationstatic GrantAuthorizerGRANT_CREATEGrantsAuthorizer.Operation.CREATEauthorizationstatic GrantAuthorizerGRANT_CREATE_SUBSCRIBEGrantsAuthorizer.Operation.CREATEandAuthorizer.Operation.SUBSCRIBEauthorizationstatic GrantAuthorizerGRANT_NONEGrants no authorization, the authorization request is ignoredstatic GrantAuthorizerGRANT_PUBLISHGrantsAuthorizer.Operation.PUBLISHauthorizationstatic GrantAuthorizerGRANT_SUBSCRIBEGrantsAuthorizer.Operation.SUBSCRIBEauthorizationstatic GrantAuthorizerGRANT_SUBSCRIBE_PUBLISHGrantsAuthorizer.Operation.SUBSCRIBEandAuthorizer.Operation.PUBLISHauthorization -
Method Summary
Modifier and Type Method Description Authorizer.Resultauthorize(Authorizer.Operation operation, org.cometd.bayeux.ChannelId channel, ServerSession session, ServerMessage message)StringtoString()
-
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, org.cometd.bayeux.ChannelId channel, ServerSession session, ServerMessage message)- Specified by:
authorizein interfaceAuthorizer
-
toString
-