Package com.pusher.client
Interface ChannelAuthorizer
-
- All Known Subinterfaces:
Authorizer
- All Known Implementing Classes:
HttpAuthorizer,HttpChannelAuthorizer
public interface ChannelAuthorizer
Subscriptions toPrivateandpresencechannels need to be authorized. This interface provides anauthorize(java.lang.String, java.lang.String)method as a mechanism for doing this.See the
HttpChannelAuthorizeras an example.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Stringauthorize(java.lang.String channelName, java.lang.String socketId)Called when a channel subscription is to be authorized.
-
-
-
Method Detail
-
authorize
java.lang.String authorize(java.lang.String channelName, java.lang.String socketId) throws AuthorizationFailureException
Called when a channel subscription is to be authorized.- Parameters:
channelName- The name of the channel to be authorized.socketId- A unique socket connection ID to be used with the authorization. This uniquely identifies the connection that the subscription is being authorized for.- Returns:
- A channel authorization token.
- Throws:
AuthorizationFailureException- if the authorization fails.
-
-