Package com.pusher.client.util
Class HttpAuthorizer
- java.lang.Object
-
- com.pusher.client.util.HttpChannelAuthorizer
-
- com.pusher.client.util.HttpAuthorizer
-
- All Implemented Interfaces:
Authorizer,ChannelAuthorizer
@Deprecated public class HttpAuthorizer extends HttpChannelAuthorizer implements Authorizer
Deprecated.Please useHttpChannelAuthorizer
-
-
Field Summary
Fields Modifier and Type Field Description protected ConnectionFactorymConnectionFactory
-
Constructor Summary
Constructors Constructor Description HttpAuthorizer(java.lang.String endPoint)Deprecated.Creates a new authorizer.HttpAuthorizer(java.lang.String endPoint, ConnectionFactory connectionFactory)Deprecated.Creates a new authorizer.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.BooleanisSSL()Identifies if the HTTP request will be sent over HTTPS.protected java.lang.StringperformAuthRequest()Performs an HTTP request to the endpoint provided on construction.voidsetHeaders(java.util.Map<java.lang.String,java.lang.String> headers)Set additional headers to be sent as part of the request.-
Methods inherited from class com.pusher.client.util.HttpChannelAuthorizer
authFailureException, authFailureException, authorize
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.pusher.client.ChannelAuthorizer
authorize
-
-
-
-
Field Detail
-
mConnectionFactory
protected ConnectionFactory mConnectionFactory
-
-
Constructor Detail
-
HttpAuthorizer
public HttpAuthorizer(java.lang.String endPoint)
Deprecated.Creates a new authorizer.- Parameters:
endPoint- The endpoint to be called when authenticating.
-
HttpAuthorizer
public HttpAuthorizer(java.lang.String endPoint, ConnectionFactory connectionFactory)
Deprecated.Creates a new authorizer.- Parameters:
endPoint- The endpoint to be called when authenticating.connectionFactory- a custom connection factory to be used for building the connection
-
-
Method Detail
-
setHeaders
public void setHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
Set additional headers to be sent as part of the request.- Parameters:
headers- A map of headers
-
isSSL
public java.lang.Boolean isSSL()
Identifies if the HTTP request will be sent over HTTPS.- Returns:
- true if the endpoint protocol is 'https'
-
performAuthRequest
protected java.lang.String performAuthRequest()
Performs an HTTP request to the endpoint provided on construction.The request shall include the headers and parameters provided by the connectionFactory.
Child classes must provide the connection parameters to the connectionFactory before calling this method.
- Returns:
- HTTP request response body
-
-