public final class DefaultRefreshTokenTokenResponseClient extends java.lang.Object implements OAuth2AccessTokenResponseClient<OAuth2RefreshTokenGrantRequest>
OAuth2AccessTokenResponseClient
for the
refresh_token
grant. This implementation
uses a RestOperations
when requesting an access token credential at the
Authorization Server's Token Endpoint.Constructor and Description |
---|
DefaultRefreshTokenTokenResponseClient() |
Modifier and Type | Method and Description |
---|---|
OAuth2AccessTokenResponse |
getTokenResponse(OAuth2RefreshTokenGrantRequest refreshTokenGrantRequest)
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<OAuth2RefreshTokenGrantRequest,org.springframework.http.RequestEntity<?>> requestEntityConverter)
Sets the
Converter used for converting the
OAuth2RefreshTokenGrantRequest to a RequestEntity representation of
the OAuth 2.0 Access Token Request. |
void |
setRestOperations(org.springframework.web.client.RestOperations restOperations)
Sets the
RestOperations used when requesting the OAuth 2.0 Access Token
Response. |
public DefaultRefreshTokenTokenResponseClient()
public OAuth2AccessTokenResponse getTokenResponse(OAuth2RefreshTokenGrantRequest refreshTokenGrantRequest)
OAuth2AccessTokenResponseClient
getTokenResponse
in interface OAuth2AccessTokenResponseClient<OAuth2RefreshTokenGrantRequest>
refreshTokenGrantRequest
- the authorization grant request that contains the
authorization grant credentialOAuth2AccessTokenResponse
that contains the
access token
credentialpublic void setRequestEntityConverter(org.springframework.core.convert.converter.Converter<OAuth2RefreshTokenGrantRequest,org.springframework.http.RequestEntity<?>> requestEntityConverter)
Converter
used for converting the
OAuth2RefreshTokenGrantRequest
to a RequestEntity
representation of
the OAuth 2.0 Access Token Request.requestEntityConverter
- the Converter
used for converting to a
RequestEntity
representation of the Access Token Requestpublic void setRestOperations(org.springframework.web.client.RestOperations restOperations)
RestOperations
used when requesting the OAuth 2.0 Access Token
Response.
NOTE: At a minimum, the supplied restOperations
must be configured
with the following:
HttpMessageConverter
's - FormHttpMessageConverter
and
OAuth2AccessTokenResponseHttpMessageConverter
ResponseErrorHandler
- OAuth2ErrorResponseErrorHandler
restOperations
- the RestOperations
used when requesting the Access
Token Response