-
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)status: duplicateA duplicate of another issueA duplicate of another issue
Description
Summary
We should provide a simple way to integrate OAuth support with RestTemplate. This support would be similar to the WebClient support, but for RestTemplate.
The WebClient extension for Servlet-based applications is ServletOAuth2AuthorizedClientExchangeFilterFunction.
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 and RestTemplate support. Here is a break-down of the tasks involved.
- User should be able to set the current client using either an
OAuth2AuthorizedClientorclientRegistrationId - Each request should contain the
Authorizationheader withBearer <access-token>for the currentOAuth2AuthorizedClient - Get a new access token if it's not available for the current
clientRegistrationId - Refresh an expired access token - applicable to
authorization_codegrant clients - Get a new access token when current token expired - applicable to
client_credentialsgrant clients - Add clock skew support for access token expiry time
n0mer, aegershman, muff1nman, spanierm42, L7R7 and 1 more
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)status: duplicateA duplicate of another issueA duplicate of another issue