Class WebAuthnAuthenticator

  • All Implemented Interfaces:
    org.keycloak.authentication.Authenticator, org.keycloak.authentication.CredentialValidator<WebAuthnCredentialProvider>, org.keycloak.provider.Provider
    Direct Known Subclasses:
    WebAuthnPasswordlessAuthenticator

    public class WebAuthnAuthenticator
    extends Object
    implements org.keycloak.authentication.Authenticator, org.keycloak.authentication.CredentialValidator<WebAuthnCredentialProvider>
    Authenticator for WebAuthn authentication, which will be typically used when WebAuthn is used as second factor.
    • Constructor Detail

      • WebAuthnAuthenticator

        public WebAuthnAuthenticator​(org.keycloak.models.KeycloakSession session)
    • Method Detail

      • authenticate

        public void authenticate​(org.keycloak.authentication.AuthenticationFlowContext context)
        Specified by:
        authenticate in interface org.keycloak.authentication.Authenticator
      • getWebAuthnPolicy

        protected org.keycloak.models.WebAuthnPolicy getWebAuthnPolicy​(org.keycloak.authentication.AuthenticationFlowContext context)
      • getRpID

        protected String getRpID​(org.keycloak.authentication.AuthenticationFlowContext context)
      • getCredentialType

        protected String getCredentialType()
      • shouldDisplayAuthenticators

        protected boolean shouldDisplayAuthenticators​(org.keycloak.authentication.AuthenticationFlowContext context)
      • action

        public void action​(org.keycloak.authentication.AuthenticationFlowContext context)
        Specified by:
        action in interface org.keycloak.authentication.Authenticator
      • requiresUser

        public boolean requiresUser()
        Specified by:
        requiresUser in interface org.keycloak.authentication.Authenticator
      • configuredFor

        public boolean configuredFor​(org.keycloak.models.KeycloakSession session,
                                     org.keycloak.models.RealmModel realm,
                                     org.keycloak.models.UserModel user)
        Specified by:
        configuredFor in interface org.keycloak.authentication.Authenticator
      • setRequiredActions

        public void setRequiredActions​(org.keycloak.models.KeycloakSession session,
                                       org.keycloak.models.RealmModel realm,
                                       org.keycloak.models.UserModel user)
        Specified by:
        setRequiredActions in interface org.keycloak.authentication.Authenticator
      • getRequiredActions

        public List<org.keycloak.authentication.RequiredActionFactory> getRequiredActions​(org.keycloak.models.KeycloakSession session)
        Specified by:
        getRequiredActions in interface org.keycloak.authentication.Authenticator
      • close

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