-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Closed
Labels
in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: bugA general bugA general bug
Milestone
Description
Summary
DefaultReactiveOAuth2AuthorizedClientManager.saveAuthorizedClient never actually saves the authorized client, because it ignores the Mono<Void> returned from authorizedClientRepository.saveAuthorizedClient
Actual Behavior
DefaultReactiveOAuth2AuthorizedClientManager.saveAuthorizedClient does not save the authorized client.
Lines 108 to 111 in 6ad328f
| .map(exchange -> { | |
| this.authorizedClientRepository.saveAuthorizedClient(authorizedClient, principal, exchange); | |
| return authorizedClient; | |
| }) |
this.authorizedClientRepository.saveAuthorizedClient returns a Mono<Void>, which is ignored, and never included in the stream, and therefore never subscribed.
Expected Behavior
DefaultReactiveOAuth2AuthorizedClientManager.saveAuthorizedClient saves the authorized client.
Perhaps:
.flatMap(exchange ->
this.authorizedClientRepository.saveAuthorizedClient(authorizedClient, principal, exchange)
.thenReturn(authorizedClient))Configuration
n/a
Version
Spring Boot 2.2.0.RELEASE
Spring Security 5.2.0.RELEASE
Sample
n/a
andriy-z and shimikano
Metadata
Metadata
Assignees
Labels
in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: bugA general bugA general bug