Interface OAuth2AccessTokenResponseClient<T extends AbstractOAuth2AuthorizationGrantRequest>
-
- All Known Implementing Classes:
DefaultAuthorizationCodeTokenResponseClient,DefaultClientCredentialsTokenResponseClient,DefaultJwtBearerTokenResponseClient,DefaultPasswordTokenResponseClient,DefaultRefreshTokenTokenResponseClient,NimbusAuthorizationCodeTokenResponseClient
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface OAuth2AccessTokenResponseClient<T extends AbstractOAuth2AuthorizationGrantRequest>A strategy for "exchanging" an authorization grant credential (e.g. an Authorization Code) for an access token credential at the Authorization Server's Token Endpoint.- Since:
- 5.0
- See Also:
AbstractOAuth2AuthorizationGrantRequest,OAuth2AccessTokenResponse,AuthorizationGrantType, Section 1.3 Authorization Grant, Section 4.1.3 Access Token Request (Authorization Code Grant), Section 4.1.4 Access Token Response (Authorization Code Grant)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponsegetTokenResponse(T authorizationGrantRequest)Exchanges the authorization grant credential, provided in the authorization grant request, for an access token credential at the Authorization Server's Token Endpoint.
-
-
-
Method Detail
-
getTokenResponse
org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse getTokenResponse(T authorizationGrantRequest)
Exchanges the authorization grant credential, provided in the authorization grant request, for an access token credential at the Authorization Server's Token Endpoint.- Parameters:
authorizationGrantRequest- the authorization grant request that contains the authorization grant credential- Returns:
- an
OAuth2AccessTokenResponsethat contains theaccess tokencredential - Throws:
org.springframework.security.oauth2.core.OAuth2AuthorizationException- if an error occurs while attempting to exchange for the access token credential
-
-