@SupportsCredentials(credentialClass={DigestCredentials.class,Digest.class}, credentialStorage=DigestCredentialStorage.class) public class DigestCredentialHandler<S,V,U> extends AbstractCredentialHandler<CredentialStore<?>,DigestCredentials,Digest>
This particular implementation supports the validation of DigestCredentials
.
When using this handler, password are always stored using: H(A1) = MD5 (unq(username) ":" unq(realm) ":" password). During
the validation this handler will use the stored HA1 to compare with the digest provided by the Digest
credential.
This is done in two ways, if the credential has the method and uri setted the H(A2) will also be calculated and used to
calcutate the final digest as KD ( H(A1), unq(nonce-value) ":" nc-value ":" unq(cnonce-value) ":" unq(qop-value) ":" H(A2) ).
Constructor and Description |
---|
DigestCredentialHandler() |
Modifier and Type | Method and Description |
---|---|
CredentialStorage |
createCredentialStorage(IdentityContext context,
Account account,
Digest digest,
CredentialStore<?> store,
Date effectiveDate,
Date expiryDate) |
protected Account |
getAccount(IdentityContext context,
DigestCredentials credentials) |
protected CredentialStorage |
getCredentialStorage(IdentityContext context,
Account account,
DigestCredentials credentials,
CredentialStore<?> store) |
protected boolean |
validateCredential(IdentityContext context,
CredentialStorage credentialStorage,
DigestCredentials credentials,
CredentialStore<?> store) |
getAccount, getAccountById, getDefaultLoginNameProperty, getIdentityManager, isDebugEnabled, setup, update, validate
protected Account getAccount(IdentityContext context, DigestCredentials credentials)
getAccount
in class AbstractCredentialHandler<CredentialStore<?>,DigestCredentials,Digest>
protected CredentialStorage getCredentialStorage(IdentityContext context, Account account, DigestCredentials credentials, CredentialStore<?> store)
getCredentialStorage
in class AbstractCredentialHandler<CredentialStore<?>,DigestCredentials,Digest>
protected boolean validateCredential(IdentityContext context, CredentialStorage credentialStorage, DigestCredentials credentials, CredentialStore<?> store)
validateCredential
in class AbstractCredentialHandler<CredentialStore<?>,DigestCredentials,Digest>
public CredentialStorage createCredentialStorage(IdentityContext context, Account account, Digest digest, CredentialStore<?> store, Date effectiveDate, Date expiryDate)
createCredentialStorage
in class AbstractCredentialHandler<CredentialStore<?>,DigestCredentials,Digest>
Copyright © 2018 JBoss by Red Hat. All rights reserved.