Class ExtractTOTPFromHeader

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

public class ExtractTOTPFromHeader extends AbstractTOTPExtractionAction
An action that derives the TOTP code from an HTTP header.
  • Field Details

  • Constructor Details

    • ExtractTOTPFromHeader

      public ExtractTOTPFromHeader()
      Constructor.
  • Method Details

    • setHeaderName

      public void setHeaderName(@Nonnull @NotEmpty String header)
      Set the name of the header to examine.
      Parameters:
      header - header name
    • extractCode

      @Nullable protected String extractCode(@Nonnull HttpServletRequest httpRequest)
      Gets the token code from the HTTP request.
      Specified by:
      extractCode in class AbstractTOTPExtractionAction
      Parameters:
      httpRequest - current HTTP request
      Returns:
      the token code, or null