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 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, ChannelId channel, ServerSession session, ServerMessage message)
String
toString()
-
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)- Specified by:
authorize
in interfaceAuthorizer
-
toString
-