Class ValidateDuoResponseState

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

public class ValidateDuoResponseState extends AbstractDuoAuthenticationAction
Authentication action that validates the Duo response state parameter (which is required in the Duo flow) matches that in the 2FA request.
Event:
EventIds.PROCEED_EVENT_ID, AuthnEventIds.NO_CREDENTIALS
Precondition:
      ProfileRequestContext.getSubcontext(AuthenticationContext.class, false) != null
      
,
      AuthenticationContext.getSubcontext(DuoOIDCAuthenticationContext.class, false) != null
      
  • Field Details

    • log

      @Nonnull @NotEmpty private final org.slf4j.Logger log
      Class logger.
  • Constructor Details

    • ValidateDuoResponseState

      public ValidateDuoResponseState()
  • Method Details

    • doExecute

      protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext, @Nonnull DuoOIDCAuthenticationContext duoContext)
      Performs this Duo authentication action using the supplied Duo context. Implementations should override this method.
      Overrides:
      doExecute in class AbstractDuoAuthenticationAction
      Parameters:
      profileRequestContext - the current IdP profile request context
      authenticationContext - the current authentication context
      duoContext - the Duo authentication context
    • blankState

      private void blankState(@Nonnull DuoOIDCAuthenticationContext context)
      Set the request and response states to null so they can't be reused. There is no control on how long they persist in-memory.
      Parameters:
      context - the duo context.