C - the type of the context that the match method actually needs to use. Can be
an ApplicationContext or a class of an existing bean.public abstract class ApplicationContextServerWebExchangeMatcher<C>
extends java.lang.Object
implements org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher
ApplicationContext backed ServerWebExchangeMatcher. Can work directly
with the ApplicationContext, obtain an existing bean or
create a new bean
that is autowired in the usual way.| Constructor and Description |
|---|
ApplicationContextServerWebExchangeMatcher(java.lang.Class<? extends C> contextClass) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.function.Supplier<C> |
getContext(org.springframework.web.server.ServerWebExchange exchange) |
protected boolean |
ignoreApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Returns if the
ApplicationContext should be ignored and not used for
matching. |
protected void |
initialized(java.util.function.Supplier<C> context)
Called once the context has been initialized.
|
reactor.core.publisher.Mono<org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher.MatchResult> |
matches(org.springframework.web.server.ServerWebExchange exchange) |
protected abstract reactor.core.publisher.Mono<org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher.MatchResult> |
matches(org.springframework.web.server.ServerWebExchange exchange,
java.util.function.Supplier<C> context)
Decides whether the rule implemented by the strategy matches the supplied exchange.
|
public ApplicationContextServerWebExchangeMatcher(java.lang.Class<? extends C> contextClass)
public final reactor.core.publisher.Mono<org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher.MatchResult> matches(org.springframework.web.server.ServerWebExchange exchange)
matches in interface org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcherprotected abstract reactor.core.publisher.Mono<org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher.MatchResult> matches(org.springframework.web.server.ServerWebExchange exchange,
java.util.function.Supplier<C> context)
exchange - the source exchangecontext - a supplier for the initialized context (may throw an exception)protected boolean ignoreApplicationContext(org.springframework.context.ApplicationContext applicationContext)
ApplicationContext should be ignored and not used for
matching. If this method returns true then the context will not be used and
the matches method will return false.applicationContext - the candidate application contextprotected java.util.function.Supplier<C> getContext(org.springframework.web.server.ServerWebExchange exchange)
protected void initialized(java.util.function.Supplier<C> context)
context - a supplier for the initialized context (may throw an exception)