OAuth2AuthorizedClientArgumentResolver could use OAuth2AuthorizedClientManager registered in context #8700
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
type: enhancement
A general enhancement
Milestone
Describe the bug
OAuth2ClientConfiguration.OAuth2ClientWebMvcSecurityConfiguration
does not use theOAuth2AuthorizedClientManager
provided by the Spring configuration, therefore@RegisteredOAuth2AuthorizedClient
annotated parameters do not use potential customization done in the config.To Reproduce
Let's say you want to customize the access token response for a refresh like described in the doc
this will not be taken into account when the token is refreshed through a
@RegisteredOAuth2AuthorizedClient
parameter because OAuth2ClientConfiguration creates aOAuth2AuthorizedClientManager
by itself.Expected behavior
Maybe
OAuth2ClientConfiguration.OAuth2ClientWebMvcSecurityConfiguration
should inject anOAuth2AuthorizedClientManager
and use this one if it exists ? (or allow the customization of the manager created if it is intended to create a different one).The text was updated successfully, but these errors were encountered: