Class DigestLib


  • public class DigestLib
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      DigestLib()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static AuthRequestModifier buildDigest​(AuthChallenge aHeader, java.lang.String user, java.lang.String password, java.lang.String method, java.lang.String requestTarget)
      Function to modify a HttpRequest.Builder for digest authentication.
      static java.lang.String calcDigestChallengeResponse​(AuthChallenge auth, java.lang.String username, java.lang.String password, java.lang.String method, java.lang.String requestTarget, java.lang.String cnonce, java.lang.String nc, java.lang.String authType)
      From the challenge, username and password, calculate the response.field.
      static java.lang.String generateNonce()
      Generate a nonce for the client to use in a digest auth session.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DigestLib

        public DigestLib()
    • Method Detail

      • calcDigestChallengeResponse

        public static java.lang.String calcDigestChallengeResponse​(AuthChallenge auth,
                                                                   java.lang.String username,
                                                                   java.lang.String password,
                                                                   java.lang.String method,
                                                                   java.lang.String requestTarget,
                                                                   java.lang.String cnonce,
                                                                   java.lang.String nc,
                                                                   java.lang.String authType)
        From the challenge, username and password, calculate the response.field.
      • generateNonce

        public static java.lang.String generateNonce()
        Generate a nonce for the client to use in a digest auth session. Each call of this static method returns a new string (to within the limits of random number generation).
      • buildDigest

        public static AuthRequestModifier buildDigest​(AuthChallenge aHeader,
                                                      java.lang.String user,
                                                      java.lang.String password,
                                                      java.lang.String method,
                                                      java.lang.String requestTarget)
        Function to modify a HttpRequest.Builder for digest authentication. One instance of this function is used for each digest session.