Package io.ably.lib.http
Class HttpAuth
- java.lang.Object
-
- io.ably.lib.http.HttpAuth
-
public class HttpAuth extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpAuth.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAuthorizationHeader(java.lang.String method, java.lang.String uri, byte[] requestBody)Get authorization header based on the last-received server nonce.voidprocessAuthenticateHeaders(java.util.Map<HttpAuth.Type,java.lang.String> authenticateHeaders)Process a challenge; this selects the auth type to use and caches all possible values based on the challenge in the case of digest authstatic java.util.Map<HttpAuth.Type,java.lang.String>sortAuthenticateHeaders(java.util.Collection<java.lang.String> authenticateHeaders)Split a compound authenticate header string to get details for each auth type
-
-
-
Method Detail
-
sortAuthenticateHeaders
public static java.util.Map<HttpAuth.Type,java.lang.String> sortAuthenticateHeaders(java.util.Collection<java.lang.String> authenticateHeaders) throws AblyException
Split a compound authenticate header string to get details for each auth type- Parameters:
authenticateHeaders-- Returns:
- Throws:
AblyException
-
getAuthorizationHeader
public java.lang.String getAuthorizationHeader(java.lang.String method, java.lang.String uri, byte[] requestBody) throws AblyExceptionGet authorization header based on the last-received server nonce. This increments nc, and generates a new cnonce- Parameters:
method-uri-requestBody-- Returns:
- Throws:
AblyException
-
processAuthenticateHeaders
public void processAuthenticateHeaders(java.util.Map<HttpAuth.Type,java.lang.String> authenticateHeaders) throws AblyException
Process a challenge; this selects the auth type to use and caches all possible values based on the challenge in the case of digest auth- Parameters:
authenticateHeaders-- Throws:
AblyException
-
-