Polish
This commit is contained in:
parent
65734414f7
commit
405af8a0a1
|
|
@ -45,8 +45,12 @@ public class DelegatingReactiveAuthorizationManager implements ReactiveAuthoriza
|
||||||
public Mono<AuthorizationDecision> check(Mono<Authentication> authentication, ServerWebExchange exchange) {
|
public Mono<AuthorizationDecision> check(Mono<Authentication> authentication, ServerWebExchange exchange) {
|
||||||
return Flux.fromIterable(mappings)
|
return Flux.fromIterable(mappings)
|
||||||
.concatMap(mapping -> mapping.getMatcher().matches(exchange)
|
.concatMap(mapping -> mapping.getMatcher().matches(exchange)
|
||||||
.filter(ServerWebExchangeMatcher.MatchResult::isMatch)
|
.filter(ServerWebExchangeMatcher.MatchResult::isMatch)
|
||||||
.flatMap(r -> mapping.getEntry().check(authentication, new AuthorizationContext(exchange, r.getVariables()))))
|
.map(r -> r.getVariables())
|
||||||
|
.flatMap(variables -> mapping.getEntry()
|
||||||
|
.check(authentication, new AuthorizationContext(exchange, variables))
|
||||||
|
)
|
||||||
|
)
|
||||||
.next()
|
.next()
|
||||||
.defaultIfEmpty(new AuthorizationDecision(false));
|
.defaultIfEmpty(new AuthorizationDecision(false));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue