Class DefaultRefreshTokenTokenResponseClient

java.lang.Object
org.springframework.security.oauth2.client.endpoint.DefaultRefreshTokenTokenResponseClient
All Implemented Interfaces:
OAuth2AccessTokenResponseClient<OAuth2RefreshTokenGrantRequest>

@Deprecated(since="6.4") public final class DefaultRefreshTokenTokenResponseClient extends Object implements OAuth2AccessTokenResponseClient<OAuth2RefreshTokenGrantRequest>
The default implementation of an OAuth2AccessTokenResponseClient for the refresh_token grant. This implementation uses a RestOperations when requesting an access token credential at the Authorization Server's Token Endpoint.
Since:
5.2
See Also:
  • Constructor Details

    • DefaultRefreshTokenTokenResponseClient

      public DefaultRefreshTokenTokenResponseClient()
      Deprecated.
  • Method Details

    • getTokenResponse

      public OAuth2AccessTokenResponse getTokenResponse(OAuth2RefreshTokenGrantRequest refreshTokenGrantRequest)
      Deprecated.
      Description copied from interface: OAuth2AccessTokenResponseClient
      Exchanges the authorization grant credential, provided in the authorization grant request, for an access token credential at the Authorization Server's Token Endpoint.
      Specified by:
      getTokenResponse in interface OAuth2AccessTokenResponseClient<OAuth2RefreshTokenGrantRequest>
      Parameters:
      refreshTokenGrantRequest - the authorization grant request that contains the authorization grant credential
      Returns:
      an OAuth2AccessTokenResponse that contains the access token credential
    • setRequestEntityConverter

      public void setRequestEntityConverter(org.springframework.core.convert.converter.Converter<OAuth2RefreshTokenGrantRequest,org.springframework.http.RequestEntity<?>> requestEntityConverter)
      Deprecated.
      Sets the Converter used for converting the OAuth2RefreshTokenGrantRequest to a RequestEntity representation of the OAuth 2.0 Access Token Request.
      Parameters:
      requestEntityConverter - the Converter used for converting to a RequestEntity representation of the Access Token Request
    • setRestOperations

      public void setRestOperations(org.springframework.web.client.RestOperations restOperations)
      Deprecated.
      Sets the RestOperations used when requesting the OAuth 2.0 Access Token Response.

      NOTE: At a minimum, the supplied restOperations must be configured with the following:

      1. HttpMessageConverter's - FormHttpMessageConverter and OAuth2AccessTokenResponseHttpMessageConverter
      2. ResponseErrorHandler - OAuth2ErrorResponseErrorHandler
      Parameters:
      restOperations - the RestOperations used when requesting the Access Token Response