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.- 
Constructor SummaryConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.
- 
Method SummaryModifier and TypeMethodDescriptiongetTokenResponse(TokenExchangeGrantRequest grantRequest) 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.voidsetRequestEntityConverter(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 theConverterused for converting theTokenExchangeGrantRequestto aRequestEntityrepresentation of the OAuth 2.0 Access Token Request.voidsetRestOperations(org.springframework.web.client.RestOperations restOperations) Deprecated, for removal: This API element is subject to removal in a future version.Sets theRestOperationsused when requesting the OAuth 2.0 Access Token Response.
- 
Constructor Details- 
DefaultTokenExchangeTokenResponseClientpublic DefaultTokenExchangeTokenResponseClient()Deprecated, for removal: This API element is subject to removal in a future version.
 
- 
- 
Method Details- 
getTokenResponseDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:OAuth2AccessTokenResponseClientExchanges the authorization grant credential, provided in the authorization grant request, for an access token credential at the Authorization Server's Token Endpoint.- Specified by:
- getTokenResponsein interface- OAuth2AccessTokenResponseClient<TokenExchangeGrantRequest>
- Parameters:
- grantRequest- the authorization grant request that contains the authorization grant credential
- Returns:
- an OAuth2AccessTokenResponsethat contains theaccess tokencredential
 
- 
setRequestEntityConverterpublic 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 theConverterused for converting theTokenExchangeGrantRequestto aRequestEntityrepresentation of the OAuth 2.0 Access Token Request.- Parameters:
- requestEntityConverter- the- Converterused for converting to a- RequestEntityrepresentation of the Access Token Request
 
- 
setRestOperationspublic void setRestOperations(org.springframework.web.client.RestOperations restOperations) Deprecated, for removal: This API element is subject to removal in a future version.Sets theRestOperationsused when requesting the OAuth 2.0 Access Token Response.NOTE: At a minimum, the supplied restOperationsmust be configured with the following:- HttpMessageConverter's -- FormHttpMessageConverterand- OAuth2AccessTokenResponseHttpMessageConverter
- ResponseErrorHandler-- OAuth2ErrorResponseErrorHandler
 - Parameters:
- restOperations- the- RestOperationsused when requesting the Access Token Response
 
 
- 
RestClientRefreshTokenTokenResponseClientinstead