Class DefaultPasswordTokenResponseClient
- java.lang.Object
-
- org.springframework.security.oauth2.client.endpoint.DefaultPasswordTokenResponseClient
-
- All Implemented Interfaces:
OAuth2AccessTokenResponseClient<OAuth2PasswordGrantRequest>
@Deprecated public final class DefaultPasswordTokenResponseClient extends java.lang.Object implements OAuth2AccessTokenResponseClient<OAuth2PasswordGrantRequest>
Deprecated.The latest OAuth 2.0 Security Best Current Practice disallows the use of the Resource Owner Password Credentials grant. See reference OAuth 2.0 Security Best Current Practice.The default implementation of anOAuth2AccessTokenResponseClientfor thepasswordgrant. This implementation uses aRestOperationswhen requesting an access token credential at the Authorization Server's Token Endpoint.- Since:
- 5.2
- See Also:
OAuth2AccessTokenResponseClient,OAuth2PasswordGrantRequest,OAuth2AccessTokenResponse, Section 4.3.2 Access Token Request (Resource Owner Password Credentials Grant), Section 4.3.3 Access Token Response (Resource Owner Password Credentials Grant)
-
-
Constructor Summary
Constructors Constructor Description DefaultPasswordTokenResponseClient()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponsegetTokenResponse(OAuth2PasswordGrantRequest passwordGrantRequest)Deprecated.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<OAuth2PasswordGrantRequest,org.springframework.http.RequestEntity<?>> requestEntityConverter)Deprecated.Sets theConverterused for converting theOAuth2PasswordGrantRequestto aRequestEntityrepresentation of the OAuth 2.0 Access Token Request.voidsetRestOperations(org.springframework.web.client.RestOperations restOperations)Deprecated.Sets theRestOperationsused when requesting the OAuth 2.0 Access Token Response.
-
-
-
Method Detail
-
getTokenResponse
public org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse getTokenResponse(OAuth2PasswordGrantRequest passwordGrantRequest)
Deprecated.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 interfaceOAuth2AccessTokenResponseClient<OAuth2PasswordGrantRequest>- Parameters:
passwordGrantRequest- the authorization grant request that contains the authorization grant credential- Returns:
- an
OAuth2AccessTokenResponsethat contains theaccess tokencredential
-
setRequestEntityConverter
public void setRequestEntityConverter(org.springframework.core.convert.converter.Converter<OAuth2PasswordGrantRequest,org.springframework.http.RequestEntity<?>> requestEntityConverter)
Deprecated.Sets theConverterused for converting theOAuth2PasswordGrantRequestto aRequestEntityrepresentation of the OAuth 2.0 Access Token Request.- Parameters:
requestEntityConverter- theConverterused for converting to aRequestEntityrepresentation of the Access Token Request
-
setRestOperations
public void setRestOperations(org.springframework.web.client.RestOperations restOperations)
Deprecated.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 -FormHttpMessageConverterandOAuth2AccessTokenResponseHttpMessageConverterResponseErrorHandler-OAuth2ErrorResponseErrorHandler
- Parameters:
restOperations- theRestOperationsused when requesting the Access Token Response
-
-