Package io.ably.lib.http

Class HttpAuth

java.lang.Object
io.ably.lib.http.HttpAuth

public class HttpAuth extends Object
  • 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 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