Class HeaderMatcher

java.lang.Object
org.pac4j.core.matching.matcher.HeaderMatcher
All Implemented Interfaces:
Matcher

public class HeaderMatcher extends Object implements Matcher
Matching on a HTTP header.
Since:
1.9.3
Author:
Jerome Leleu
  • Field Details

    • pattern

      protected Pattern pattern
  • Constructor Details

    • HeaderMatcher

      public HeaderMatcher()

      Constructor for HeaderMatcher.

    • HeaderMatcher

      public HeaderMatcher(String headerName, String expectedValue)

      Constructor for HeaderMatcher.

      Parameters:
      headerName - a String object
      expectedValue - a String object
  • Method Details

    • matches

      public boolean matches(CallContext ctx)
      Check if the context matches.
      Specified by:
      matches in interface Matcher
      Parameters:
      ctx - the context
      Returns:
      whether the context matches
    • setExpectedValue

      public void setExpectedValue(String expectedValue)

      Setter for the field expectedValue.

      Parameters:
      expectedValue - a String object