public class DefaultClientCredentialsTokenResponseClient extends java.lang.Object implements OAuth2AccessTokenResponseClient<OAuth2ClientCredentialsGrantRequest>
OAuth2AccessTokenResponseClient
for the client_credentials grant.
This implementation uses a RestOperations when requesting
an access token credential at the Authorization Server's Token Endpoint.| Constructor and Description |
|---|
DefaultClientCredentialsTokenResponseClient() |
| Modifier and Type | Method and Description |
|---|---|
OAuth2AccessTokenResponse |
getTokenResponse(OAuth2ClientCredentialsGrantRequest clientCredentialsGrantRequest)
Exchanges the authorization grant credential, provided in the authorization grant request,
for an access token credential at the Authorization Server's Token Endpoint.
|
void |
setRestOperations(org.springframework.web.client.RestOperations restOperations)
Sets the
RestOperations used when requesting the access token response. |
public DefaultClientCredentialsTokenResponseClient()
public OAuth2AccessTokenResponse getTokenResponse(OAuth2ClientCredentialsGrantRequest clientCredentialsGrantRequest) throws OAuth2AuthenticationException
OAuth2AccessTokenResponseClientgetTokenResponse in interface OAuth2AccessTokenResponseClient<OAuth2ClientCredentialsGrantRequest>clientCredentialsGrantRequest - the authorization grant request that contains the authorization grant credentialOAuth2AccessTokenResponse that contains the access token credentialOAuth2AuthenticationException - if an error occurs while attempting to exchange for the access token credentialpublic final void setRestOperations(org.springframework.web.client.RestOperations restOperations)
RestOperations used when requesting the access token response.restOperations - the RestOperations used when requesting the access token response