|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.pusher.client.util.HttpAuthorizer
public class HttpAuthorizer
Used to authenticate a private
or presence
channel subscription.
Makes an HTTP request to a defined HTTP endpoint. Expects an authentication token to be returned.
For more information see the Authenticating Users documentation.
Constructor Summary | |
---|---|
HttpAuthorizer(String endPoint)
Creates a new authorizer. |
Method Summary | |
---|---|
String |
authorize(String channelName,
String socketId)
Called when a channel is to be authenticated. |
void |
setHeaders(HashMap<String,String> headers)
Set additional headers to be sent as part of the request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpAuthorizer(String endPoint)
endPoint
- The endpoint to be called when authenticating.Method Detail |
---|
public void setHeaders(HashMap<String,String> headers)
headers
- public String authorize(String channelName, String socketId) throws AuthorizationFailureException
Authorizer
authorize
in interface Authorizer
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.
AuthorizationFailureException
- if the authentication fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |