Package io.ably.lib.http
Class HttpAuth
java.lang.Object
io.ably.lib.http.HttpAuth
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAuthorizationHeader
(String method, String uri, byte[] requestBody) Get authorization header based on the last-received server nonce.void
processAuthenticateHeaders
(Map<HttpAuth.Type, 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 Map<HttpAuth.Type,
String> sortAuthenticateHeaders
(Collection<String> authenticateHeaders) Split a compound authenticate header string to get details for each auth type
-
Method Details
-
sortAuthenticateHeaders
public static Map<HttpAuth.Type,String> sortAuthenticateHeaders(Collection<String> authenticateHeaders) throws AblyException Split a compound authenticate header string to get details for each auth type- Parameters:
-
authenticateHeaders
- - Returns:
- Throws:
AblyException
-
getAuthorizationHeader
public String getAuthorizationHeader(String method, String uri, byte[] requestBody) throws AblyException Get 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(Map<HttpAuth.Type, String> authenticateHeaders) throws AblyExceptionProcess 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
-