public class DigestVerifier<T extends SecretVerifier> extends SecretVerifier
LocalVerifier
returning secrets in
clear.Digest
,
DigestAuthenticator
RESULT_INVALID, RESULT_MISSING, RESULT_STALE, RESULT_UNKNOWN, RESULT_UNSUPPORTED, RESULT_VALID
Constructor and Description |
---|
DigestVerifier(java.lang.String algorithm,
T wrappedVerifier,
java.lang.String wrappedAlgorithm)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected char[] |
digest(java.lang.String identifier,
char[] secret,
java.lang.String algorithm)
Computes the digest of a secret according to a specified algorithm.
|
java.lang.String |
getAlgorithm()
Returns the digest algorithm of provided secrets.
|
java.lang.String |
getWrappedAlgorithm()
Returns the digest algorithm of secrets returned by the wrapped verifier.
|
char[] |
getWrappedSecret(java.lang.String identifier)
Returns the wrapped secret associated to a given identifier.
|
char[] |
getWrappedSecretDigest(java.lang.String identifier)
Returns the digest of the wrapped secret associated to a given
identifier.
|
T |
getWrappedVerifier()
Returns the wrapped secret verifier.
|
void |
setAlgorithm(java.lang.String algorithm)
Sets the digest algorithm of provided secrets.
|
void |
setWrappedAlgorithm(java.lang.String wrappedAlgorithm)
Sets the digest algorithm of secrets returned by the wrapped verifier.
|
void |
setWrappedVerifier(T wrappedVerifier)
Sets the wrapped secret verifier.
|
int |
verify(java.lang.String identifier,
char[] secret) |
compare, createUser, getIdentifier, getSecret, verify
public DigestVerifier(java.lang.String algorithm, T wrappedVerifier, java.lang.String wrappedAlgorithm)
algorithm
- The digest algorithm of provided secrets.wrappedVerifier
- The wrapped secret verifier.wrappedAlgorithm
- The digest algorithm of secrets provided by the wrapped
verifier.Digest
protected char[] digest(java.lang.String identifier, char[] secret, java.lang.String algorithm)
identifier
- The user identifier.secret
- The regular secret to digest.algorithm
- The digest algorithm to use.Digest
public java.lang.String getAlgorithm()
public java.lang.String getWrappedAlgorithm()
public char[] getWrappedSecret(java.lang.String identifier)
LocalVerifier
.identifier
- The identifier to lookup.public char[] getWrappedSecretDigest(java.lang.String identifier)
LocalVerifier
.identifier
- The identifier to lookup.public T getWrappedVerifier()
public void setAlgorithm(java.lang.String algorithm)
algorithm
- The digest algorithm of secrets provided by the user.Digest
public void setWrappedAlgorithm(java.lang.String wrappedAlgorithm)
wrappedAlgorithm
- The digest algorithm of secrets returned by the wrapped
verifier.Digest
public void setWrappedVerifier(T wrappedVerifier)
wrappedVerifier
- The wrapped secret verifier.public int verify(java.lang.String identifier, char[] secret)
verify
in class SecretVerifier
Copyright © 2005-2024 Restlet.