Class ExtractUserAgentAddress

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

public class ExtractUserAgentAddress extends AbstractExtractionAction
An action that extracts the user-agent's IP address from the incoming request, creates a UserAgentContext, and attaches it to the AuthenticationContext.
Event:
EventIds.PROCEED_EVENT_ID, AuthnEventIds.NO_CREDENTIALS
Precondition:
ProfileRequestContext.getSubcontext(AuthenticationContext.class, false) != null
Postcondition:
If getHttpServletRequest() != null, the content of getRemoteAddr() will be attached via a UserAgentContext, provided it is a valid IP address.
  • Field Details

    • log

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

    • ExtractUserAgentAddress

      public ExtractUserAgentAddress()
  • Method Details

    • 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