Class AddAuthenticatorAttachmentRequirement

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, ProfileAction, Aware, MessageSource, MessageSourceAware, Action

public class AddAuthenticatorAttachmentRequirement extends AbstractWebAuthnAction<WebAuthnRegistrationContext>
Add an authenticator attachment requirement to the context. Default is null which translates to a requirement of 'any'.
Precondition:
ProfileRequestContext.getSubcontext(WebAuthnRegistrationContext.class) != null
Postcondition:
WebAuthnRegistrationContext.getAuthenticatorAttachmentRequirement() != null
  • Field Details

    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
    • authenticatorAttachmentRequirementLookupStrategy

      @Nonnull private Function<ProfileRequestContext,com.yubico.webauthn.data.AuthenticatorAttachment> authenticatorAttachmentRequirementLookupStrategy
      A strategy to lookup the AuthenticatorAttachment requirement. Default is null, so 'any'.
  • Constructor Details

    • AddAuthenticatorAttachmentRequirement

      public AddAuthenticatorAttachmentRequirement()
      Constructor.
  • Method Details

    • setAuthenticatorAttachmentRequirement

      public void setAuthenticatorAttachmentRequirement(@Nullable String requirement)
      Set the authenticator attachment requirement.
      Parameters:
      requirement - The authenticator attachment requirement to set.
    • setAuthenticatorAttachmentRequirementLookupStrategy

      public void setAuthenticatorAttachmentRequirementLookupStrategy(@Nullable Function<ProfileRequestContext,com.yubico.webauthn.data.AuthenticatorAttachment> strategy)
      Set the lookup strategy to find the authenticator attachment requirement.
      Parameters:
      strategy - The authenticator attachment requirement lookup strategy to set.
    • doExecute

      protected void doExecute(ProfileRequestContext profileRequestContext, WebAuthnRegistrationContext context)
      Performs this WebAuthn authentication action using the supplied WebAuthn context. Implementations should override this method.
      Overrides:
      doExecute in class AbstractWebAuthnAction<WebAuthnRegistrationContext>
      Parameters:
      profileRequestContext - the current IdP profile request context
      context - the WebAuthn context