Class OrRequestMatcher

java.lang.Object
org.springframework.security.web.util.matcher.OrRequestMatcher
All Implemented Interfaces:
RequestMatcher

public final class OrRequestMatcher extends Object implements RequestMatcher
RequestMatcher that will return true if any of the passed in RequestMatcher instances match.
Since:
3.2
  • Constructor Details

    • OrRequestMatcher

      public OrRequestMatcher(List<RequestMatcher> requestMatchers)
      Creates a new instance
      Parameters:
      requestMatchers - the RequestMatcher instances to try
    • OrRequestMatcher

      public OrRequestMatcher(RequestMatcher... requestMatchers)
      Creates a new instance
      Parameters:
      requestMatchers - the RequestMatcher instances to try
  • Method Details

    • matches

      public boolean matches(jakarta.servlet.http.HttpServletRequest request)
      Description copied from interface: RequestMatcher
      Decides whether the rule implemented by the strategy matches the supplied request.
      Specified by:
      matches in interface RequestMatcher
      Parameters:
      request - the request to check for a match
      Returns:
      true if the request matches, false otherwise
    • matcher

      public RequestMatcher.MatchResult matcher(jakarta.servlet.http.HttpServletRequest request)
      Returns a RequestMatcher.MatchResult for this HttpServletRequest. In the case of a match, request variables are any request variables from the first underlying matcher.
      Specified by:
      matcher in interface RequestMatcher
      Parameters:
      request - the HTTP request
      Returns:
      a RequestMatcher.MatchResult based on the given HTTP request
      Since:
      6.1
    • toString

      public String toString()
      Overrides:
      toString in class Object