Class AbstractWebClientReactiveOAuth2AccessTokenResponseClient<T extends AbstractOAuth2AuthorizationGrantRequest>
java.lang.Object
org.springframework.security.oauth2.client.endpoint.AbstractWebClientReactiveOAuth2AccessTokenResponseClient<T>
- Type Parameters:
- T- type of grant request
- All Implemented Interfaces:
- ReactiveOAuth2AccessTokenResponseClient<T>
- Direct Known Subclasses:
- WebClientReactiveAuthorizationCodeTokenResponseClient,- WebClientReactiveClientCredentialsTokenResponseClient,- WebClientReactiveJwtBearerTokenResponseClient,- WebClientReactivePasswordTokenResponseClient,- WebClientReactiveRefreshTokenTokenResponseClient,- WebClientReactiveTokenExchangeTokenResponseClient
public abstract class AbstractWebClientReactiveOAuth2AccessTokenResponseClient<T extends AbstractOAuth2AuthorizationGrantRequest>
extends Object
implements ReactiveOAuth2AccessTokenResponseClient<T>
Abstract base class for all of the 
WebClientReactive*TokenResponseClients that
 communicate to the Authorization Server's Token Endpoint.
 Submits a form request body specific to the type of grant request.
Accepts a JSON response body containing an OAuth 2.0 Access token or error.
- 
Method SummaryModifier and TypeMethodDescriptionfinal voidaddHeadersConverter(org.springframework.core.convert.converter.Converter<T, org.springframework.http.HttpHeaders> headersConverter) Add (compose) the providedheadersConverterto the currentConverterused for converting theAbstractOAuth2AuthorizationGrantRequestinstance to aHttpHeadersused in the OAuth 2.0 Access Token Request headers.final voidaddParametersConverter(org.springframework.core.convert.converter.Converter<T, org.springframework.util.MultiValueMap<String, String>> parametersConverter) Add (compose) the providedparametersConverterto the currentConverterused for converting theAbstractOAuth2AuthorizationGrantRequestinstance to aMultiValueMapused in the OAuth 2.0 Access Token Request body.reactor.core.publisher.Mono<OAuth2AccessTokenResponse>getTokenResponse(T grantRequest) Exchanges the authorization grant credential, provided in the authorization grant request, for an access token credential at the Authorization Server's Token Endpoint.final voidsetBodyExtractor(org.springframework.web.reactive.function.BodyExtractor<reactor.core.publisher.Mono<OAuth2AccessTokenResponse>, org.springframework.http.ReactiveHttpInputMessage> bodyExtractor) Sets theBodyExtractorthat will be used to decode theOAuth2AccessTokenResponsefinal voidsetHeadersConverter(org.springframework.core.convert.converter.Converter<T, org.springframework.http.HttpHeaders> headersConverter) Sets theConverterused for converting theAbstractOAuth2AuthorizationGrantRequestinstance to aHttpHeadersused in the OAuth 2.0 Access Token Request headers.final voidsetParametersConverter(org.springframework.core.convert.converter.Converter<T, org.springframework.util.MultiValueMap<String, String>> parametersConverter) Sets theConverterused for converting theAbstractOAuth2AuthorizationGrantRequestinstance to aMultiValueMapused in the OAuth 2.0 Access Token Request body.voidsetParametersCustomizer(Consumer<org.springframework.util.MultiValueMap<String, String>> parametersCustomizer) Sets theConsumerused for customizing the OAuth 2.0 Access Token parameters, which allows for parameters to be added, overwritten or removed.final voidsetWebClient(org.springframework.web.reactive.function.client.WebClient webClient) Sets theWebClientused when requesting the OAuth 2.0 Access Token Response.
- 
Method Details- 
getTokenResponseDescription copied from interface:ReactiveOAuth2AccessTokenResponseClientExchanges 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- ReactiveOAuth2AccessTokenResponseClient<T extends AbstractOAuth2AuthorizationGrantRequest>
- Parameters:
- grantRequest- the authorization grant request that contains the authorization grant credential
- Returns:
- an OAuth2AccessTokenResponsethat contains theaccess tokencredential
 
- 
setWebClientpublic final void setWebClient(org.springframework.web.reactive.function.client.WebClient webClient) Sets theWebClientused when requesting the OAuth 2.0 Access Token Response.- Parameters:
- webClient- the- WebClientused when requesting the Access Token Response
 
- 
setHeadersConverterpublic final void setHeadersConverter(org.springframework.core.convert.converter.Converter<T, org.springframework.http.HttpHeaders> headersConverter) Sets theConverterused for converting theAbstractOAuth2AuthorizationGrantRequestinstance to aHttpHeadersused in the OAuth 2.0 Access Token Request headers.- Parameters:
- headersConverter- the- Converterused for converting the- AbstractOAuth2AuthorizationGrantRequestto- HttpHeaders
- Since:
- 5.6
 
- 
addHeadersConverterpublic final void addHeadersConverter(org.springframework.core.convert.converter.Converter<T, org.springframework.http.HttpHeaders> headersConverter) Add (compose) the providedheadersConverterto the currentConverterused for converting theAbstractOAuth2AuthorizationGrantRequestinstance to aHttpHeadersused in the OAuth 2.0 Access Token Request headers.- Parameters:
- headersConverter- the- Converterto add (compose) to the current- Converterused for converting the- AbstractOAuth2AuthorizationGrantRequestto a- HttpHeaders
- Since:
- 5.6
 
- 
setParametersConverterpublic final void setParametersConverter(org.springframework.core.convert.converter.Converter<T, org.springframework.util.MultiValueMap<String, String>> parametersConverter) Sets theConverterused for converting theAbstractOAuth2AuthorizationGrantRequestinstance to aMultiValueMapused in the OAuth 2.0 Access Token Request body.- Parameters:
- parametersConverter- the- Converterused for converting the- AbstractOAuth2AuthorizationGrantRequestto- MultiValueMap
- Since:
- 5.6
 
- 
addParametersConverterpublic final void addParametersConverter(org.springframework.core.convert.converter.Converter<T, org.springframework.util.MultiValueMap<String, String>> parametersConverter) Add (compose) the providedparametersConverterto the currentConverterused for converting theAbstractOAuth2AuthorizationGrantRequestinstance to aMultiValueMapused in the OAuth 2.0 Access Token Request body.- Parameters:
- parametersConverter- the- Converterto add (compose) to the current- Converterused for converting the- AbstractOAuth2AuthorizationGrantRequestto a- MultiValueMap
- Since:
- 5.6
 
- 
setParametersCustomizerpublic void setParametersCustomizer(Consumer<org.springframework.util.MultiValueMap<String, String>> parametersCustomizer) Sets theConsumerused for customizing the OAuth 2.0 Access Token parameters, which allows for parameters to be added, overwritten or removed.- Parameters:
- parametersCustomizer- the- Consumerto customize the parameters
 
- 
setBodyExtractorpublic final void setBodyExtractor(org.springframework.web.reactive.function.BodyExtractor<reactor.core.publisher.Mono<OAuth2AccessTokenResponse>, org.springframework.http.ReactiveHttpInputMessage> bodyExtractor) Sets theBodyExtractorthat will be used to decode theOAuth2AccessTokenResponse- Parameters:
- bodyExtractor- the- BodyExtractorthat will be used to decode the- OAuth2AccessTokenResponse
- Since:
- 5.6
 
 
-