Class ServerWebExchangeMatchers
java.lang.Object
org.springframework.security.web.server.util.matcher.ServerWebExchangeMatchers
Provides factory methods for creating common
ServerWebExchangeMatcher
- Since:
- 5.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic ServerWebExchangeMatcher
Matches any exchangestatic ServerWebExchangeMatcher
matchers
(ServerWebExchangeMatcher... matchers) Creates a matcher that will match on any of the provided matchersstatic ServerWebExchangeMatcher
pathMatchers
(String... patterns) Creates a matcher that matches on any of the provided patterns.static ServerWebExchangeMatcher
pathMatchers
(org.springframework.http.HttpMethod method, String... patterns) Creates a matcher that matches on the specific method and any of the provided patterns.static ServerWebExchangeMatcher
pathMatchers
(org.springframework.http.HttpMethod method, org.springframework.web.util.pattern.PathPattern... pathPatterns) Creates a matcher that matches on the specific method and any of the providedPathPattern
s.static ServerWebExchangeMatcher
pathMatchers
(org.springframework.web.util.pattern.PathPattern... pathPatterns) Creates a matcher that matches on any of the providedPathPattern
s.
-
Method Details
-
pathMatchers
public static ServerWebExchangeMatcher pathMatchers(org.springframework.http.HttpMethod method, String... patterns) Creates a matcher that matches on the specific method and any of the provided patterns.- Parameters:
method
- the method to match on. If null, any method will be matchedpatterns
- the patterns to match on- Returns:
- the matcher to use
-
pathMatchers
Creates a matcher that matches on any of the provided patterns.- Parameters:
patterns
- the patterns to match on- Returns:
- the matcher to use
-
pathMatchers
public static ServerWebExchangeMatcher pathMatchers(org.springframework.web.util.pattern.PathPattern... pathPatterns) Creates a matcher that matches on any of the providedPathPattern
s.- Parameters:
pathPatterns
- thePathPattern
s to match on- Returns:
- the matcher to use
-
pathMatchers
public static ServerWebExchangeMatcher pathMatchers(org.springframework.http.HttpMethod method, org.springframework.web.util.pattern.PathPattern... pathPatterns) Creates a matcher that matches on the specific method and any of the providedPathPattern
s.- Parameters:
method
- the method to match on. If null, any method will be matched.pathPatterns
- thePathPattern
s to match on- Returns:
- the matcher to use
-
matchers
Creates a matcher that will match on any of the provided matchers- Parameters:
matchers
- the matchers to match on- Returns:
- the matcher to use
-
anyExchange
Matches any exchange- Returns:
- the matcher to use
-