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
Authorizerimplementation 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Authorizer.Resultauthorize(Authorizer.Operation operation, ChannelId channel, ServerSession session, ServerMessage message)Blocking version ofAuthorizer.authorize(Operation, ChannelId, ServerSession, ServerMessage, Promise).java.lang.StringtoString()-
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 Detail
-
GRANT_CREATE
public static final GrantAuthorizer GRANT_CREATE
GrantsAuthorizer.Operation.CREATEauthorization
-
GRANT_SUBSCRIBE
public static final GrantAuthorizer GRANT_SUBSCRIBE
GrantsAuthorizer.Operation.SUBSCRIBEauthorization
-
GRANT_PUBLISH
public static final GrantAuthorizer GRANT_PUBLISH
GrantsAuthorizer.Operation.PUBLISHauthorization
-
GRANT_CREATE_SUBSCRIBE
public static final GrantAuthorizer GRANT_CREATE_SUBSCRIBE
GrantsAuthorizer.Operation.CREATEandAuthorizer.Operation.SUBSCRIBEauthorization
-
GRANT_SUBSCRIBE_PUBLISH
public static final GrantAuthorizer GRANT_SUBSCRIBE_PUBLISH
GrantsAuthorizer.Operation.SUBSCRIBEandAuthorizer.Operation.PUBLISHauthorization
-
GRANT_ALL
public static final GrantAuthorizer GRANT_ALL
GrantsAuthorizer.Operation.CREATE,Authorizer.Operation.SUBSCRIBEandAuthorizer.Operation.PUBLISHauthorization
-
GRANT_NONE
public static final GrantAuthorizer GRANT_NONE
Grants no authorization, the authorization request is ignored
-
-
Method Detail
-
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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-