Class NimbusJwtClientAuthenticationParametersConverter<T extends AbstractOAuth2AuthorizationGrantRequest>
java.lang.Object
org.springframework.security.oauth2.client.endpoint.NimbusJwtClientAuthenticationParametersConverter<T>
- Type Parameters:
 T- the type ofAbstractOAuth2AuthorizationGrantRequest
- All Implemented Interfaces:
 org.springframework.core.convert.converter.Converter<T,org.springframework.util.MultiValueMap<String, String>> 
public final class NimbusJwtClientAuthenticationParametersConverter<T extends AbstractOAuth2AuthorizationGrantRequest>
extends Object
implements org.springframework.core.convert.converter.Converter<T,org.springframework.util.MultiValueMap<String,String>>  
A 
Converter that customizes the OAuth 2.0 Access Token Request parameters by
 adding a signed JSON Web Token (JWS) to be used for client authentication at the
 Authorization Server's Token Endpoint. The private/secret key used for signing the JWS
 is supplied by the com.nimbusds.jose.jwk.JWK resolver provided via the
 constructor.
 NOTE: This implementation uses the Nimbus JOSE + JWT SDK.
- Since:
 - 5.5
 - See Also:
 - 
ConverterJWKAbstractOAuth2AuthorizationGrantRequestEntityConverter.addParametersConverter(Converter)AbstractOAuth2AuthorizationGrantRequestEntityConverter.addParametersConverter(Converter)- 2.2 Using JWTs for Client Authentication
 - 4.2 Using Assertions for Client Authentication
 - Nimbus JOSE + JWT SDK
 
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classNimbusJwtClientAuthenticationParametersConverter.JwtClientAuthenticationContext<T extends AbstractOAuth2AuthorizationGrantRequest>A context that holds client authentication-specific state and is used byNimbusJwtClientAuthenticationParametersConverterwhen attempting to customize the JSON Web Token (JWS) client assertion. - 
Constructor Summary
ConstructorsConstructorDescriptionNimbusJwtClientAuthenticationParametersConverter(Function<ClientRegistration, com.nimbusds.jose.jwk.JWK> jwkResolver) Constructs aNimbusJwtClientAuthenticationParametersConverterusing the provided parameters. - 
Method Summary
Modifier and TypeMethodDescriptionvoidsetJwtClientAssertionCustomizer(Consumer<NimbusJwtClientAuthenticationParametersConverter.JwtClientAuthenticationContext<T>> jwtClientAssertionCustomizer) Sets theConsumerto be provided theNimbusJwtClientAuthenticationParametersConverter.JwtClientAuthenticationContext, which contains theJwsHeader.BuilderandJwtClaimsSet.Builderfor further customization.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.core.convert.converter.Converter
andThen 
- 
Constructor Details
- 
NimbusJwtClientAuthenticationParametersConverter
public NimbusJwtClientAuthenticationParametersConverter(Function<ClientRegistration, com.nimbusds.jose.jwk.JWK> jwkResolver) Constructs aNimbusJwtClientAuthenticationParametersConverterusing the provided parameters.- Parameters:
 jwkResolver- the resolver that provides thecom.nimbusds.jose.jwk.JWKassociated to theclient
 
 - 
 - 
Method Details
- 
convert
- Specified by:
 convertin interfaceorg.springframework.core.convert.converter.Converter<T extends AbstractOAuth2AuthorizationGrantRequest,org.springframework.util.MultiValueMap<String, String>> 
 - 
setJwtClientAssertionCustomizer
public void setJwtClientAssertionCustomizer(Consumer<NimbusJwtClientAuthenticationParametersConverter.JwtClientAuthenticationContext<T>> jwtClientAssertionCustomizer) Sets theConsumerto be provided theNimbusJwtClientAuthenticationParametersConverter.JwtClientAuthenticationContext, which contains theJwsHeader.BuilderandJwtClaimsSet.Builderfor further customization.- Parameters:
 jwtClientAssertionCustomizer- theConsumerto be provided theNimbusJwtClientAuthenticationParametersConverter.JwtClientAuthenticationContext- Since:
 - 5.7
 
 
 -