public class HttpDigestVerifier extends DigestVerifier<LocalVerifier>
DigestVerifier.getWrappedSecretDigest(String)
method.RESULT_INVALID, RESULT_MISSING, RESULT_STALE, RESULT_UNKNOWN, RESULT_UNSUPPORTED, RESULT_VALID
Constructor and Description |
---|
HttpDigestVerifier(DigestAuthenticator digestAuthenticator,
LocalVerifier wrappedVerifier,
String wrappedAlgorithm)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected char[] |
digest(String identifier,
char[] secret,
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. |
DigestAuthenticator |
getDigestAuthenticator()
Returns the associated digest authenticator.
|
void |
setDigestAuthenticator(DigestAuthenticator digestAuthenticator)
Sets the associated digest authenticator.
|
int |
verify(Request request,
Response response)
Verifies that the proposed secret is correct for the specified request.
|
getAlgorithm, getWrappedAlgorithm, getWrappedSecret, getWrappedSecretDigest, getWrappedVerifier, setAlgorithm, setWrappedAlgorithm, setWrappedVerifier, verify
compare, createUser, getIdentifier, getSecret
public HttpDigestVerifier(DigestAuthenticator digestAuthenticator, LocalVerifier wrappedVerifier, String wrappedAlgorithm)
digestAuthenticator
- The associated digest authenticator.wrappedAlgorithm
- The digest algorithm of secrets provided by the wrapped
verifier.wrappedVerifier
- The wrapped secret verifier.protected char[] digest(String identifier, char[] secret, String algorithm)
Digest.ALGORITHM_HTTP_DIGEST
, then is
retrieves the realm for getDigestAuthenticator()
to compute the
digest, otherwise, it keeps the default behavior.digest
in class DigestVerifier<LocalVerifier>
identifier
- The user identifier.secret
- The regular secret to digest.algorithm
- The digest algorithm to use.Digest
public DigestAuthenticator getDigestAuthenticator()
public void setDigestAuthenticator(DigestAuthenticator digestAuthenticator)
digestAuthenticator
- The associated digest authenticator.public int verify(Request request, Response response)
SecretVerifier
ChallengeResponse.getSecret()
method and sets the User
instance of the
request's ClientInfo
if successful.verify
in interface Verifier
verify
in class SecretVerifier
request
- The request to inspect.response
- The response to inspect.Copyright © 2005–2015. All rights reserved.