public interface SecurityPolicy
A Bayeux SecurityPolicy defines the broad authorization constraints that must be enforced by
a BayeuxServer.
Authorizer.
,p>
A BayeuxServer may deny the handshake from clients that do not have proper
authentication credentials, or may deny clients to publish on reserved channels and so on;
all these activities are controlled by the SecurityPolicy implementation installed
on the BayeuxServer.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCreate(BayeuxServer server,
ServerSession session,
String channelId,
ServerMessage message)
Checks if a message should be allowed to create a new channel.
|
boolean |
canHandshake(BayeuxServer server,
ServerSession session,
ServerMessage message)
Checks if a handshake message should be accepted.
|
boolean |
canPublish(BayeuxServer server,
ServerSession session,
ServerChannel channel,
ServerMessage message)
Checks if a client can publish a message to a channel.
|
boolean |
canSubscribe(BayeuxServer server,
ServerSession session,
ServerChannel channel,
ServerMessage message)
Checks if a client is allowed to subscribe to a channel.
|
boolean canCreate(BayeuxServer server, ServerSession session, String channelId, ServerMessage message)
server - the BayeuxServer objectsession - the client sending the message (may be null if an anonymous publish is attempted)channelId - the channel to be createdmessage - the message trying to create the channelboolean canHandshake(BayeuxServer server, ServerSession session, ServerMessage message)
server - the BayeuxServer objectsession - the session (not yet added to the BayeuxServer)message - the handshake messageServerSession instance
associated to the BayeuxServer objectboolean canPublish(BayeuxServer server, ServerSession session, ServerChannel channel, ServerMessage message)
server - the BayeuxServer objectsession - the client sending the message (may be null if an anonymous publish is attempted).channel - the channel to publish tomessage - the message to being publishedboolean canSubscribe(BayeuxServer server, ServerSession session, ServerChannel channel, ServerMessage message)
server - the BayeuxServer objectsession - the client sending the message (may be null if an anonymous subscribe is attempted).channel - the channel to subscribe tomessage - the subscribe messageCopyright © 2008-2012 Dojo Foundation. All Rights Reserved.