Class OrRequestMatcher
java.lang.Object
org.springframework.security.web.util.matcher.OrRequestMatcher
- All Implemented Interfaces:
RequestMatcher
RequestMatcher that will return true if any of the passed in
RequestMatcher instances match.- Since:
- 3.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.security.web.util.matcher.RequestMatcher
RequestMatcher.MatchResult -
Constructor Summary
ConstructorsConstructorDescriptionOrRequestMatcher(List<RequestMatcher> requestMatchers) Creates a new instanceOrRequestMatcher(RequestMatcher... requestMatchers) Creates a new instance -
Method Summary
Modifier and TypeMethodDescriptionmatcher(jakarta.servlet.http.HttpServletRequest request) Returns aRequestMatcher.MatchResultfor thisHttpServletRequest.booleanmatches(jakarta.servlet.http.HttpServletRequest request) Decides whether the rule implemented by the strategy matches the supplied request.toString()
-
Constructor Details
-
OrRequestMatcher
Creates a new instance- Parameters:
requestMatchers- theRequestMatcherinstances to try
-
OrRequestMatcher
Creates a new instance- Parameters:
requestMatchers- theRequestMatcherinstances to try
-
-
Method Details
-
matches
public boolean matches(jakarta.servlet.http.HttpServletRequest request) Description copied from interface:RequestMatcherDecides whether the rule implemented by the strategy matches the supplied request.- Specified by:
matchesin interfaceRequestMatcher- Parameters:
request- the request to check for a match- Returns:
- true if the request matches, false otherwise
-
matcher
Returns aRequestMatcher.MatchResultfor thisHttpServletRequest. In the case of a match, request variables are any request variables from the first underlying matcher.- Specified by:
matcherin interfaceRequestMatcher- Parameters:
request- the HTTP request- Returns:
- a
RequestMatcher.MatchResultbased on the given HTTP request - Since:
- 6.1
-
toString
-