Class HttpDigestVerifier

    • Field Detail

      • digestAuthenticator

        private DigestAuthenticator digestAuthenticator
        The associated digest authenticator.
    • Constructor Detail

      • HttpDigestVerifier

        public HttpDigestVerifier​(DigestAuthenticator digestAuthenticator,
                                  LocalVerifier wrappedVerifier,
                                  java.lang.String wrappedAlgorithm)
        Constructor.
        Parameters:
        digestAuthenticator - The associated digest authenticator.
        wrappedAlgorithm - The digest algorithm of secrets provided by the wrapped verifier.
        wrappedVerifier - The wrapped secret verifier.
    • Method Detail

      • digest

        protected char[] digest​(java.lang.String identifier,
                                char[] secret,
                                java.lang.String algorithm)
        If the algorithm is Digest.ALGORITHM_HTTP_DIGEST, then is retrieves the realm for getDigestAuthenticator() to compute the digest, otherwise, it keeps the default behavior.
        Overrides:
        digest in class DigestVerifier<LocalVerifier>
        Parameters:
        identifier - The user identifier.
        secret - The regular secret to digest.
        algorithm - The digest algorithm to use.
        Returns:
        The digested secret.
        See Also:
        Digest
      • getDigestAuthenticator

        public DigestAuthenticator getDigestAuthenticator()
        Returns the associated digest authenticator.
        Returns:
        The associated digest authenticator.
      • setDigestAuthenticator

        public void setDigestAuthenticator​(DigestAuthenticator digestAuthenticator)
        Sets the associated digest authenticator.
        Parameters:
        digestAuthenticator - The associated digest authenticator.
      • verify

        public int verify​(Request request,
                          Response response)
        Description copied from class: SecretVerifier
        Verifies that the proposed secret is correct for the specified request. By default, it compares the inputSecret of the request's authentication response with the one obtain by the ChallengeResponse.getSecret() method and sets the User instance of the request's ClientInfo if successful.
        Specified by:
        verify in interface Verifier
        Overrides:
        verify in class SecretVerifier
        Parameters:
        request - The request to inspect.
        response - The response to inspect.
        Returns:
        Result of the verification based on the RESULT_* constants.