com.pusher.client
Interface Authorizer

All Known Implementing Classes:
HttpAuthorizer

public interface Authorizer

Subscriptions to Private and presence channels need to be authorized. This interface provides an authorize(java.lang.String, java.lang.String) as a mechanism for doing this.

See the HttpAuthorizer as an example.


Method Summary
 String authorize(String channelName, String socketId)
          Called when a channel is to be authenticated.
 

Method Detail

authorize

String authorize(String channelName,
                 String socketId)
                 throws AuthorizationFailureException
Called when a channel is to be authenticated.

Parameters:
channelName - The name of the channel to be authenticated.
socketId - A unique socket connection ID to be used with the authentication. This uniquely identifies the connection that the subscription is being authenticated for.
Returns:
An authentication token.
Throws:
AuthorizationFailureException - if the authentication fails.


Copyright © 2013 Pusher. All Rights Reserved.