-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add OAuth + RestTemplate support #4920
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
Comments
Partial support for |
This ticket is to track support of RestTempalte supporting something similar to WebClient. I have reopened this and updated the description to make that more clear |
@L7R7 Thanks for your interest. It would be great if you can help here. The one main thing that needs to get ironed out before we put too much effort here is the fact that The |
Ok, I think I got the problem. I'm not familiar with the internals of |
Is there still a plan to implement this or the focus would now be on the new RestClient in Spring 6.1? @jgrandja |
@alexcrownus We would likely focus on the new |
@jgrandja now that RestClient is available, what is the status of this? are there plans to support this now? This would be super useful for us as there are quirks (related to reactive nature) when using WebClients which we could avoid. |
Closing in favour of gh-13588 |
Uh oh!
There was an error while loading. Please reload this page.
Summary
We should provide a simple way to integrate OAuth support with RestTemplate. This support would be similar to the
WebClient
support, but forRestTemplate
.The
WebClient
extension for Servlet-based applications isServletOAuth2AuthorizedClientExchangeFilterFunction
.See the sample oauth2webclient and how to configure and use it.
There are a few tasks involved in order to reach feature parity between
ServletOAuth2AuthorizedClientExchangeFilterFunction
andRestTemplate
support. Here is a break-down of the tasks involved.OAuth2AuthorizedClient
orclientRegistrationId
Authorization
header withBearer <access-token>
for the currentOAuth2AuthorizedClient
clientRegistrationId
authorization_code
grant clientsclient_credentials
grant clientsThe text was updated successfully, but these errors were encountered: