1
0
mirror of synced 2026-08-07 02:38:47 +00:00

Update to Reactor 2025.0.0-SNAPSHOT

To prepare for the release we should update to Reactor
2025.0.0-SNAPSHOT to fix any issues that are present.

Closes gh-18041
This commit is contained in:
Rob Winch
2025-10-13 10:48:10 -05:00
parent 4b6c9cca7e
commit b864be92d8
18 changed files with 43 additions and 20 deletions
@@ -55,10 +55,10 @@ public class AuthorizationPayloadInterceptor implements PayloadInterceptor, Orde
}
@Override
@SuppressWarnings("NullAway") // https://github.com/uber/NullAway/issues/1290
public Mono<Void> intercept(PayloadExchange exchange, PayloadInterceptorChain chain) {
return ReactiveSecurityContextHolder.getContext()
.filter((c) -> c.getAuthentication() != null)
.map(SecurityContext::getAuthentication)
.mapNotNull(SecurityContext::getAuthentication)
.switchIfEmpty(Mono.error(() -> new AuthenticationCredentialsNotFoundException(
"An Authentication (possibly AnonymousAuthenticationToken) is required.")))
.as((authentication) -> this.authorizationManager.verify(authentication, exchange))
@@ -52,12 +52,13 @@ public final class PayloadExchangeMatcherReactiveAuthorizationManager
}
@Override
@SuppressWarnings("NullAway") // https://github.com/uber/NullAway/issues/1290
public Mono<AuthorizationResult> authorize(Mono<Authentication> authentication, PayloadExchange exchange) {
return Flux.fromIterable(this.mappings)
.concatMap((mapping) -> mapping.getMatcher()
.matches(exchange)
.filter(PayloadExchangeMatcher.MatchResult::isMatch)
.map(MatchResult::getVariables)
.mapNotNull(MatchResult::getVariables)
.flatMap((variables) -> mapping.getEntry()
.authorize(authentication, new PayloadExchangeAuthorizationContext(exchange, variables))))
.next()