Class WebAuthnRegister
java.lang.Object
org.keycloak.authentication.requiredactions.WebAuthnRegister
- All Implemented Interfaces:
CredentialAction,CredentialRegistrator,RequiredActionProvider,Provider
- Direct Known Subclasses:
WebAuthnPasswordlessRegister
public class WebAuthnRegister
extends Object
implements RequiredActionProvider, CredentialRegistrator
Required action for register WebAuthn 2-factor credential for the user
-
Constructor Summary
ConstructorsConstructorDescriptionWebAuthnRegister(KeycloakSession session, com.webauthn4j.verifier.attestation.trustworthiness.certpath.CertPathTrustworthinessVerifier certPathtrustVerifier) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected com.webauthn4j.WebAuthnRegistrationManagerCreate WebAuthnRegistrationManager instance Can be overridden in subclasses to customize the used attestation validatorsvoidevaluateTriggers(RequiredActionContext context) Called every time a user authenticates.protected Stringprotected StringgetCredentialType(KeycloakSession session, AuthenticationSessionModel authenticationSession) protected EventTypeDeprecated.protected WebAuthnPolicygetWebAuthnPolicy(RequiredActionContext context) Determines what type of support is provided for application-initiated actions.voidprocessAction(RequiredActionContext context) Called when a required action has form input you want to process.voidIf the user has a required action set, this method will be the initial call to obtain what to display to the user's browser.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.authentication.RequiredActionProvider
getMaxAuthAge, getMaxAuthAge, initiatedActionCanceled
-
Constructor Details
-
WebAuthnRegister
public WebAuthnRegister(KeycloakSession session, com.webauthn4j.verifier.attestation.trustworthiness.certpath.CertPathTrustworthinessVerifier certPathtrustVerifier)
-
-
Method Details
-
initiatedActionSupport
Description copied from interface:RequiredActionProviderDetermines what type of support is provided for application-initiated actions.- Specified by:
initiatedActionSupportin interfaceRequiredActionProvider- Returns:
- InititatedActionsSupport
-
requiredActionChallenge
Description copied from interface:RequiredActionProviderIf the user has a required action set, this method will be the initial call to obtain what to display to the user's browser. Return null if no action should be done.- Specified by:
requiredActionChallengein interfaceRequiredActionProvider
-
getWebAuthnPolicy
-
getCredentialType
public String getCredentialType(KeycloakSession session, AuthenticationSessionModel authenticationSession) - Specified by:
getCredentialTypein interfaceCredentialAction- Returns:
- credential type, which this action is able to register. This should refer to the same value as returned by
CredentialProvider.getType()of the corresponding credential provider andConfigurableAuthenticatorFactory.getReferenceCategory()of the corresponding authenticator
-
getCredentialType
-
getCredentialProviderId
-
getOriginalEventTypeForBackwardsCompatibility
@Deprecated protected EventType getOriginalEventTypeForBackwardsCompatibility(RequiredActionContext context) Deprecated.For compatibility sake as long as we use @linkEventType.UPDATE_PASSWORD,EventType.UPDATE_TOTPa.s.o.Method to provide removal and deprecation hint -
processAction
Description copied from interface:RequiredActionProviderCalled when a required action has form input you want to process.- Specified by:
processActionin interfaceRequiredActionProvider
-
createWebAuthnRegistrationManager
protected com.webauthn4j.WebAuthnRegistrationManager createWebAuthnRegistrationManager()Create WebAuthnRegistrationManager instance Can be overridden in subclasses to customize the used attestation validators- Returns:
- webauthn4j WebAuthnRegistrationManager instance
-
close
public void close() -
evaluateTriggers
Description copied from interface:RequiredActionProviderCalled every time a user authenticates. This checks to see if this required action should be triggered. The implementation of this method is responsible for setting the required action on the UserModel. For example, the UpdatePassword required actions checks the password policies to see if the password has expired.- Specified by:
evaluateTriggersin interfaceRequiredActionProvider
-
EventType.UPDATE_PASSWORD,EventType.UPDATE_TOTPa.s.o.