public class OTPFormAuthenticator extends AbstractUsernameFormAuthenticator implements Authenticator, CredentialValidator<OTPCredentialProvider>
Modifier and Type | Field and Description |
---|---|
static String |
SELECTED_OTP_CREDENTIAL_ID |
static String |
UNNAMED |
ATTEMPTED_USERNAME, REGISTRATION_FORM_ACTION
Constructor and Description |
---|
OTPFormAuthenticator() |
Modifier and Type | Method and Description |
---|---|
void |
action(AuthenticationFlowContext context)
Called from a form action invocation.
|
void |
authenticate(AuthenticationFlowContext context)
Initial call for the authenticator.
|
void |
close() |
boolean |
configuredFor(KeycloakSession session,
RealmModel realm,
UserModel user)
Is this authenticator configured for this user.
|
protected javax.ws.rs.core.Response |
createLoginForm(LoginFormsProvider form) |
protected String |
disabledByBruteForceError() |
protected String |
disabledByBruteForceFieldError() |
OTPCredentialProvider |
getCredentialProvider(KeycloakSession session) |
List<RequiredActionFactory> |
getRequiredActions(KeycloakSession session)
Overwrite this if the authenticator is associated with
|
boolean |
requiresUser()
Does this authenticator require that the user has already been identified? That AuthenticatorContext.getUser() is not null?
|
void |
setRequiredActions(KeycloakSession session,
RealmModel realm,
UserModel user)
Set actions to configure authenticator
|
void |
validateOTP(AuthenticationFlowContext context) |
challenge, challenge, dummyHash, enabledUser, getDefaultChallengeMessage, isDisabledByBruteForce, runDefaultDummyHash, setDuplicateUserChallenge, testInvalidUser, validatePassword, validatePassword, validateUser, validateUserAndPassword
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
areRequiredActionsEnabled
getCredentials, getType
public static final String SELECTED_OTP_CREDENTIAL_ID
public static final String UNNAMED
public void action(AuthenticationFlowContext context)
Authenticator
action
in interface Authenticator
action
in class AbstractUsernameFormAuthenticator
public void authenticate(AuthenticationFlowContext context)
Authenticator
authenticate
in interface Authenticator
public void validateOTP(AuthenticationFlowContext context)
public boolean requiresUser()
Authenticator
requiresUser
in interface Authenticator
protected String disabledByBruteForceError()
disabledByBruteForceError
in class AbstractUsernameFormAuthenticator
protected String disabledByBruteForceFieldError()
disabledByBruteForceFieldError
in class AbstractUsernameFormAuthenticator
protected javax.ws.rs.core.Response createLoginForm(LoginFormsProvider form)
createLoginForm
in class AbstractUsernameFormAuthenticator
public boolean configuredFor(KeycloakSession session, RealmModel realm, UserModel user)
Authenticator
configuredFor
in interface Authenticator
public void setRequiredActions(KeycloakSession session, RealmModel realm, UserModel user)
Authenticator
setRequiredActions
in interface Authenticator
public List<RequiredActionFactory> getRequiredActions(KeycloakSession session)
Authenticator
getRequiredActions
in interface Authenticator
public void close()
close
in interface Provider
close
in class AbstractFormAuthenticator
public OTPCredentialProvider getCredentialProvider(KeycloakSession session)
getCredentialProvider
in interface CredentialValidator<OTPCredentialProvider>
Copyright © 2021 JBoss by Red Hat. All rights reserved.