Class AbstractExtractionAction

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, ProfileAction, Aware, MessageSource, MessageSourceAware, Action
Direct Known Subclasses:
ExtractKerberosTicketFromWSSToken, ExtractRemoteUser, ExtractUserAgentAddress, ExtractUserAgentIdentifier, ExtractUsernamePasswordFromBasicAuth, ExtractUsernamePasswordFromFormRequest, ExtractUsernamePasswordFromWSSToken, ExtractX509CertificateFromRequest

public abstract class AbstractExtractionAction extends AbstractAuthenticationAction
A base class for authentication actions that extract usernames for subsequent use.

The base class adds a common mechanism for applying regular expression transforms to the username prior to being added to the context tree.

  • Field Details

    • log

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

      @Nonnull @NonnullElements private List<Pair<Pattern,String>> transforms
      Match patterns and replacement strings to apply.
    • uppercase

      private boolean uppercase
      Convert to uppercase prior to transforms?
    • lowercase

      private boolean lowercase
      Convert to lowercase prior to transforms?
    • trim

      private boolean trim
      Trim prior to transforms?
  • Constructor Details

    • AbstractExtractionAction

      public AbstractExtractionAction()
  • Method Details

    • setTransforms

      public void setTransforms(@Nullable @NonnullElements Collection<Pair<String,String>> newTransforms)
      A collection of regular expression and replacement pairs.
      newTransforms - collection of replacement transforms
    • setUppercase

      public void setUppercase(boolean flag)
      Controls conversion to uppercase prior to applying any transforms.
      flag - uppercase flag
    • setLowercase

      public void setLowercase(boolean flag)
      Controls conversion to lowercase prior to applying any transforms.
      flag - lowercase flag
    • setTrim

      public void setTrim(boolean flag)
      Controls whitespace trimming prior to applying any transforms.
      flag - trim flag
    • applyTransforms

      @Nonnull @NotEmpty protected String applyTransforms(@Nonnull @NotEmpty String input)
      Apply any configured regular expression replacements to an input value and return the result.
      input - the input string
      the result of applying the expressions