-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Always return current ClientRegistration in loadAuthorizedClient
#16133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0c331a9
to
39b03f9
Compare
...n/java/org/springframework/security/oauth2/client/InMemoryOAuth2AuthorizedClientService.java
Show resolved
Hide resolved
...rg/springframework/security/oauth2/client/InMemoryReactiveOAuth2AuthorizedClientService.java
Outdated
Show resolved
Hide resolved
I configured my IntelliJ code style according to https://github.com/spring-projects/spring-framework/wiki/IntelliJ-IDEA-Editor-Settings and some formatting and imports changed in the tests. |
I don't know if the the code settings are up to date, but the build enforces code style and will not pass unless it is correct. I have run the build so you can see its output.
The files were formatted correctly previously since (as mentioned above) the build would fail otherwise. |
@sjohnr Thanks for the review, I ran |
This changes `InMemoryOAuth2AuthorizedClientService.loadAuthorizedClient` (and its reactive counterpart) to always return `OAuth2AuthorizedClient` instances containing the current `ClientRegistration` as obtained from the `ClientRegistrationRepository`. Before this change, the first `ClientRegistration` instance was cached, with the effect that any changes made in the `ClientRegistrationRepository` (such as a new client secret) would not have taken effect. Closes spring-projectsgh-15511
Thanks @kzander91! This is now merged into |
This changes
InMemoryOAuth2AuthorizedClientService.loadAuthorizedClient
(and its reactive counterpart) to always returnOAuth2AuthorizedClient
instances containing the currentClientRegistration
as obtained from theClientRegistrationRepository
.Before this change, the first
ClientRegistration
instance was cached, with the effect that any changes made in theClientRegistrationRepository
(such as a new client secret) would not have taken effect.Closes gh-15511