Class PreserveAuthenticationFlowState

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

public class PreserveAuthenticationFlowState
extends AbstractAuthenticationAction
An action that extracts configured parameters from a servlet request and populates AuthenticationContext.getAuthenticationStateMap() with the data.

Multiple copies of a parameter result in a list of strings being stored in the map.

Any existing state in the map is cleared.

Event:
EventIds.PROCEED_EVENT_ID
Postcondition:
The AuthenticationContext is modified as above.
  • Field Details

    • log

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

      @Nonnull @NonnullElements private Collection<String> parameterNames
      Parameter names to look for.
  • Constructor Details

    • PreserveAuthenticationFlowState

      PreserveAuthenticationFlowState()
      Constructor.
  • Method Details

    • setParameterNames

      public void setParameterNames​(@Nullable @NonnullElements Collection<String> names)
      Set the parameter names to look for.
      Parameters:
      names - parameter names
    • doPreExecute

      protected boolean doPreExecute​(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
      Performs this authentication action's pre-execute step. Default implementation just returns true.
      Overrides:
      doPreExecute in class AbstractAuthenticationAction
      Parameters:
      profileRequestContext - the current IdP profile request context
      authenticationContext - the current authentication context
      Returns:
      true iff execution should continue
    • doExecute

      protected void doExecute​(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
      Performs this authentication action. Default implementation throws an exception.
      Overrides:
      doExecute in class AbstractAuthenticationAction
      Parameters:
      profileRequestContext - the current IdP profile request context
      authenticationContext - the current authentication context