Class DefaultOAuth2TokenRequestParametersConverter<T extends AbstractOAuth2AuthorizationGrantRequest>
java.lang.Object
org.springframework.security.oauth2.client.endpoint.DefaultOAuth2TokenRequestParametersConverter<T>
- Type Parameters:
T
- type of grant request
- All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<T,
org.springframework.util.MultiValueMap<String, String>>
public final class DefaultOAuth2TokenRequestParametersConverter<T extends AbstractOAuth2AuthorizationGrantRequest>
extends Object
implements org.springframework.core.convert.converter.Converter<T,org.springframework.util.MultiValueMap<String,String>>
Default
Converter
used to convert an
AbstractOAuth2AuthorizationGrantRequest
to the default parameters
of an OAuth 2.0 Access Token Request.
This implementation provides grant-type specific parameters for the following grant types:
authorization_code
refresh_token
client_credentials
password
urn:ietf:params:oauth:grant-type:jwt-bearer
urn:ietf:params:oauth:grant-type:token-exchange
grant_type
- always providedclient_id
- provided unless theclientAuthenticationMethod
isclient_secret_basic
client_secret
- provided when theclientAuthenticationMethod
isclient_secret_post
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setParametersCustomizer
(Consumer<org.springframework.util.MultiValueMap<String, String>> parametersCustomizer) Sets theConsumer
used for customizing the OAuth 2.0 Access Token parameters, which allows for parameters to be added, overwritten or removed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Constructor Details
-
DefaultOAuth2TokenRequestParametersConverter
public DefaultOAuth2TokenRequestParametersConverter()
-
-
Method Details
-
setParametersCustomizer
public void setParametersCustomizer(Consumer<org.springframework.util.MultiValueMap<String, String>> parametersCustomizer) Sets theConsumer
used for customizing the OAuth 2.0 Access Token parameters, which allows for parameters to be added, overwritten or removed.- Parameters:
parametersCustomizer
- theConsumer
to customize the parameters
-
convert
- Specified by:
convert
in interfaceorg.springframework.core.convert.converter.Converter<T extends AbstractOAuth2AuthorizationGrantRequest,
org.springframework.util.MultiValueMap<String, String>>
-