Class PopulateWebAuthnRegistrationContext

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

public class PopulateWebAuthnRegistrationContext extends AbstractProfileAction
An action to create (or lookup) the WebAuthnRegistrationContext and populate with the username found from the lookup strategy.
Event:
EventIds.PROCEED_EVENT_ID, EventIds.INVALID_PROFILE_CTX
Postcondition:
a WebAuthnRegistrationContext is created and the username is populated.
  • Field Details

  • Constructor Details

    • PopulateWebAuthnRegistrationContext

      public PopulateWebAuthnRegistrationContext()
      Constructor.
  • Method Details

    • setUsernameRequired

      public void setUsernameRequired(boolean flag)
      Set a flag to determine if the username is required or not.
      Parameters:
      flag - is the username required?
    • setUsernameRequiredPredicate

      public void setUsernameRequiredPredicate(@Nonnull Predicate<ProfileRequestContext> predicate)
      Set a strategy to determine if the username is required or not.
      Parameters:
      predicate - the predicate to set.
    • setRemoveExistingRegistrationContext

      public void setRemoveExistingRegistrationContext(boolean flag)
      Set a flag to determine if an existing registration context should be removed.
      Parameters:
      flag - should an existing registration context be removed?
    • setRemoveExistingRegistrationContextPredicate

      public void setRemoveExistingRegistrationContextPredicate(@Nonnull Predicate<ProfileRequestContext> predicate)
      Set a strategy to determine if an existing registration context should be removed.
      Parameters:
      predicate - the predicate to set.
    • setWebAuthnRegistrationContextCreationStrategy

      public void setWebAuthnRegistrationContextCreationStrategy(@Nonnull Function<ProfileRequestContext,WebAuthnRegistrationContext> strategy)
      Set the strategy used to lookup or create the WebAuthn registration context.
      Parameters:
      strategy - The strategy to set.
    • setUsernameLookupStrategy

      public void setUsernameLookupStrategy(@Nonnull Function<ProfileRequestContext,String> strategy)
      Set the lookup strategy to find the username.
      Parameters:
      strategy - lookup strategy
    • doExecute

      protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)
      Overrides:
      doExecute in class AbstractProfileAction