Class HttpAuth


  • public class HttpAuth
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  HttpAuth.Type  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAuthorizationHeader​(java.lang.String method, java.lang.String uri, byte[] requestBody)
      Get authorization header based on the last-received server nonce.
      void processAuthenticateHeaders​(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 auth
      static 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 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​(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