Class WebAuthnRegister

java.lang.Object
org.keycloak.authentication.requiredactions.WebAuthnRegister
All Implemented Interfaces:
org.keycloak.authentication.CredentialAction, org.keycloak.authentication.CredentialRegistrator, org.keycloak.authentication.RequiredActionProvider, org.keycloak.provider.Provider
Direct Known Subclasses:
WebAuthnPasswordlessRegister

public class WebAuthnRegister extends Object implements org.keycloak.authentication.RequiredActionProvider, org.keycloak.authentication.CredentialRegistrator
Required action for register WebAuthn 2-factor credential for the user
  • Constructor Summary

    Constructors
    Constructor
    Description
    WebAuthnRegister(org.keycloak.models.KeycloakSession session, com.webauthn4j.verifier.attestation.trustworthiness.certpath.CertPathTrustworthinessVerifier certPathtrustVerifier)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected com.webauthn4j.WebAuthnRegistrationManager
    createWebAuthnRegistrationManager(org.keycloak.models.WebAuthnPolicy policy)
    Create WebAuthnRegistrationManager instance Can be overridden in subclasses to customize the used attestation validators
    void
    evaluateTriggers(org.keycloak.authentication.RequiredActionContext context)
     
    protected String
     
    protected String
     
    getCredentialType(org.keycloak.models.KeycloakSession session, org.keycloak.sessions.AuthenticationSessionModel authenticationSession)
     
    protected org.keycloak.events.EventType
    getOriginalEventTypeForBackwardsCompatibility(org.keycloak.authentication.RequiredActionContext context)
    Deprecated.
    For compatibility sake as long as we use @link EventType.UPDATE_PASSWORD , EventType.UPDATE_TOTP a.s.o.
    protected org.keycloak.models.WebAuthnPolicy
    getWebAuthnPolicy(org.keycloak.authentication.RequiredActionContext context)
     
    org.keycloak.authentication.InitiatedActionSupport
     
    void
    processAction(org.keycloak.authentication.RequiredActionContext context)
     
    void
    requiredActionChallenge(org.keycloak.authentication.RequiredActionContext context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.keycloak.authentication.RequiredActionProvider

    getMaxAuthAge, getMaxAuthAge, initiatedActionCanceled
  • Constructor Details

    • WebAuthnRegister

      public WebAuthnRegister(org.keycloak.models.KeycloakSession session, com.webauthn4j.verifier.attestation.trustworthiness.certpath.CertPathTrustworthinessVerifier certPathtrustVerifier)
  • Method Details

    • initiatedActionSupport

      public org.keycloak.authentication.InitiatedActionSupport initiatedActionSupport()
      Specified by:
      initiatedActionSupport in interface org.keycloak.authentication.RequiredActionProvider
    • requiredActionChallenge

      public void requiredActionChallenge(org.keycloak.authentication.RequiredActionContext context)
      Specified by:
      requiredActionChallenge in interface org.keycloak.authentication.RequiredActionProvider
    • getWebAuthnPolicy

      protected org.keycloak.models.WebAuthnPolicy getWebAuthnPolicy(org.keycloak.authentication.RequiredActionContext context)
    • getCredentialType

      public String getCredentialType(org.keycloak.models.KeycloakSession session, org.keycloak.sessions.AuthenticationSessionModel authenticationSession)
      Specified by:
      getCredentialType in interface org.keycloak.authentication.CredentialAction
    • getCredentialType

      protected String getCredentialType()
    • getCredentialProviderId

      protected String getCredentialProviderId()
    • getOriginalEventTypeForBackwardsCompatibility

      @Deprecated protected org.keycloak.events.EventType getOriginalEventTypeForBackwardsCompatibility(org.keycloak.authentication.RequiredActionContext context)
      Deprecated.
      For compatibility sake as long as we use @link EventType.UPDATE_PASSWORD , EventType.UPDATE_TOTP a.s.o.
      Method to provide removal and deprecation hint
    • processAction

      public void processAction(org.keycloak.authentication.RequiredActionContext context)
      Specified by:
      processAction in interface org.keycloak.authentication.RequiredActionProvider
    • createWebAuthnRegistrationManager

      protected com.webauthn4j.WebAuthnRegistrationManager createWebAuthnRegistrationManager(org.keycloak.models.WebAuthnPolicy policy)
      Create WebAuthnRegistrationManager instance Can be overridden in subclasses to customize the used attestation validators
      Parameters:
      policy - The webauthn policy defined
      Returns:
      webauthn4j WebAuthnRegistrationManager instance
    • close

      public void close()
      Specified by:
      close in interface org.keycloak.provider.Provider
    • evaluateTriggers

      public void evaluateTriggers(org.keycloak.authentication.RequiredActionContext context)
      Specified by:
      evaluateTriggers in interface org.keycloak.authentication.RequiredActionProvider