|
@@ -139,14 +139,13 @@ public final class DefaultReactiveOAuth2AuthorizedClientManager implements React
|
|
.defaultIfEmpty(authorizeRequest.getAuthorizedClient() != null ?
|
|
.defaultIfEmpty(authorizeRequest.getAuthorizedClient() != null ?
|
|
authorizeRequest.getAuthorizedClient() : authorizedClient);
|
|
authorizeRequest.getAuthorizedClient() : authorizedClient);
|
|
})
|
|
})
|
|
- .switchIfEmpty(Mono.deferWithContext(context ->
|
|
|
|
|
|
+ .switchIfEmpty(Mono.defer(() ->
|
|
// Authorize
|
|
// Authorize
|
|
this.clientRegistrationRepository.findByRegistrationId(clientRegistrationId)
|
|
this.clientRegistrationRepository.findByRegistrationId(clientRegistrationId)
|
|
.switchIfEmpty(Mono.error(() -> new IllegalArgumentException(
|
|
.switchIfEmpty(Mono.error(() -> new IllegalArgumentException(
|
|
"Could not find ClientRegistration with id '" + clientRegistrationId + "'")))
|
|
"Could not find ClientRegistration with id '" + clientRegistrationId + "'")))
|
|
.flatMap(clientRegistration -> authorizationContext(authorizeRequest, clientRegistration))
|
|
.flatMap(clientRegistration -> authorizationContext(authorizeRequest, clientRegistration))
|
|
.flatMap(authorizationContext -> authorize(authorizationContext, principal, serverWebExchange))
|
|
.flatMap(authorizationContext -> authorize(authorizationContext, principal, serverWebExchange))
|
|
- .subscriberContext(context)
|
|
|
|
)
|
|
)
|
|
));
|
|
));
|
|
}
|
|
}
|