@SupportsCredentials(credentialClass={TOTPCredentials.class,TOTPCredential.class}, credentialStorage=OTPCredentialStorage.class) public class TOTPCredentialHandler extends PasswordCredentialHandler<CredentialStore<?>,TOTPCredentials,TOTPCredential>
This particular implementation supports the validation of TOTPCredentials, and updating TOTPCredential credentials.
| Modifier and Type | Field and Description |
|---|---|
static String |
ALGORITHM |
static String |
DEFAULT_DEVICE |
static String |
DELAY_WINDOW |
static String |
INTERVAL_SECONDS |
static String |
NUMBER_DIGITS |
ALGORITHM_RANDOM_NUMBER, KEY_LENGTH_RANDOM_NUMBER, PASSWORD_ENCODER, RENEW_RANDOM_NUMBER_GENERATOR_INTERVAL, SECURE_RANDOM_PROVIDER| Constructor and Description |
|---|
TOTPCredentialHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
setup(CredentialStore<?> store) |
void |
update(IdentityContext context,
Account account,
TOTPCredential credential,
CredentialStore<?> store,
Date effectiveDate,
Date expiryDate)
Updates the credential for a certain
Account. |
void |
validate(IdentityContext context,
TOTPCredentials credentials,
CredentialStore<?> store)
Validates a credential.
|
createCredentialStorage, generateSalt, getAccount, getCredentialStorage, getSecureRandomProvider, validateCredentialgetAccount, getAccountById, getDefaultLoginNameProperty, getIdentityManager, isDebugEnabledpublic static final String ALGORITHM
public static final String INTERVAL_SECONDS
public static final String NUMBER_DIGITS
public static final String DELAY_WINDOW
public static final String DEFAULT_DEVICE
public void setup(CredentialStore<?> store)
setup in interface CredentialHandler<CredentialStore<?>,TOTPCredentials,TOTPCredential>setup in class PasswordCredentialHandler<CredentialStore<?>,TOTPCredentials,TOTPCredential>public void validate(IdentityContext context, TOTPCredentials credentials, CredentialStore<?> store)
CredentialHandlerValidates a credential.
validate in interface CredentialHandler<CredentialStore<?>,TOTPCredentials,TOTPCredential>validate in class AbstractCredentialHandler<CredentialStore<?>,TOTPCredentials,TOTPCredential>context - The contextual invocation context.credentials - The credential to be validated.store - The underlying identity store.public void update(IdentityContext context, Account account, TOTPCredential credential, CredentialStore<?> store, Date effectiveDate, Date expiryDate)
CredentialHandlerUpdates the credential for a certain Account.
update in interface CredentialHandler<CredentialStore<?>,TOTPCredentials,TOTPCredential>update in class AbstractCredentialHandler<CredentialStore<?>,TOTPCredentials,TOTPCredential>context - The contextual invocation context.account - The account which credentials should be removed.credential - The credential to be updated.store - The underlying identity store.effectiveDate - The date specifying from when this credential is valid.expiryDate - The date specifying when the credential expires.Copyright © 2018 JBoss by Red Hat. All rights reserved.