Class DefaultTokenExchangeTokenResponseClient

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

@Deprecated(since="6.4", forRemoval=true) public final class DefaultTokenExchangeTokenResponseClient extends Object implements OAuth2AccessTokenResponseClient<TokenExchangeGrantRequest>
Deprecated, for removal: This API element is subject to removal in a future version.
The default implementation of an OAuth2AccessTokenResponseClient for the token-exchange grant. This implementation uses a RestOperations when requesting an access token credential at the Authorization Server's Token Endpoint.
Since:
6.3
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Exchanges the authorization grant credential, provided in the authorization grant request, for an access token credential at the Authorization Server's Token Endpoint.
    void
    setRequestEntityConverter(org.springframework.core.convert.converter.Converter<TokenExchangeGrantRequest,org.springframework.http.RequestEntity<?>> requestEntityConverter)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the Converter used for converting the TokenExchangeGrantRequest to a RequestEntity representation of the OAuth 2.0 Access Token Request.
    void
    setRestOperations(org.springframework.web.client.RestOperations restOperations)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the RestOperations used when requesting the OAuth 2.0 Access Token Response.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultTokenExchangeTokenResponseClient

      public DefaultTokenExchangeTokenResponseClient()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getTokenResponse

      public OAuth2AccessTokenResponse getTokenResponse(TokenExchangeGrantRequest grantRequest)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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<TokenExchangeGrantRequest>
      Parameters:
      grantRequest - 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<TokenExchangeGrantRequest,org.springframework.http.RequestEntity<?>> requestEntityConverter)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the Converter used for converting the TokenExchangeGrantRequest 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, for removal: This API element is subject to removal in a future version.
      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