-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Description
Summary
When using UnAuthenticatedServerOAuth2AuthorizedClientRepository together with the DefaultReactiveOAuth2AuthorizedClientManager authorized clients are not correctly loaded/saved.
This seems to relate to #7468 (@jgrandja )
It seems that when using the UnAuthenticatedServerOAuth2AuthorizedClientRepository it is (and can) never be called from DefaultReactiveOAuth2AuthorizedClientManager as it tries to flatMap a Mono<ServerWebExchange (in the method loadAuthorizedClient). In situations there UnAuthenticatedServerOAuth2AuthorizedClientRepository can/should be used the WebExchange well be null/empty the Mono will be empty and therefore the code in flatMap will not execute.
If ServerWebExchange would be present UnAuthenticatedServerOAuth2AuthorizedClientRepository would throw an Exception there therefore needs to be a way for the ClientManager to call the repository without a WebExchange.
Version
Spring Security 5.2.0 via Spring Boot 2.2.0