Class ReactiveOidcIdTokenDecoderFactory
java.lang.Object
org.springframework.security.oauth2.client.oidc.authentication.ReactiveOidcIdTokenDecoderFactory
- All Implemented Interfaces:
org.springframework.security.oauth2.jwt.ReactiveJwtDecoderFactory<ClientRegistration>
public final class ReactiveOidcIdTokenDecoderFactory
extends Object
implements org.springframework.security.oauth2.jwt.ReactiveJwtDecoderFactory<ClientRegistration>
A
factory that provides a ReactiveJwtDecoder
used for OidcIdToken signature verification. The provided
ReactiveJwtDecoder is associated to a specific ClientRegistration.- Since:
- 5.2
- See Also:
-
ReactiveJwtDecoderFactoryClientRegistrationOidcIdToken
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.jwt.ReactiveJwtDecodercreateDecoder(ClientRegistration clientRegistration) Returns the defaultConverter's used for type conversion of claim values for anOidcIdToken.voidsetClaimTypeConverterFactory(Function<ClientRegistration, org.springframework.core.convert.converter.Converter<Map<String, Object>, Map<String, Object>>> claimTypeConverterFactory) Sets the factory that provides aConverterused for type conversion of claim values for anOidcIdToken.voidsetJwsAlgorithmResolver(Function<ClientRegistration, org.springframework.security.oauth2.jose.jws.JwsAlgorithm> jwsAlgorithmResolver) Sets the resolver that provides the expectedJWS algorithmused for the signature or MAC on theID Token.voidsetJwtValidatorFactory(Function<ClientRegistration, org.springframework.security.oauth2.core.OAuth2TokenValidator<org.springframework.security.oauth2.jwt.Jwt>> jwtValidatorFactory) Sets the factory that provides anOAuth2TokenValidator, which is used by theReactiveJwtDecoder.
-
Constructor Details
-
ReactiveOidcIdTokenDecoderFactory
public ReactiveOidcIdTokenDecoderFactory()
-
-
Method Details
-
createDefaultClaimTypeConverters
public static Map<String,org.springframework.core.convert.converter.Converter<Object, createDefaultClaimTypeConverters()?>> Returns the defaultConverter's used for type conversion of claim values for anOidcIdToken.- Returns:
- a
MapofConverter's keyed byclaim name
-
createDecoder
public org.springframework.security.oauth2.jwt.ReactiveJwtDecoder createDecoder(ClientRegistration clientRegistration) - Specified by:
createDecoderin interfaceorg.springframework.security.oauth2.jwt.ReactiveJwtDecoderFactory<ClientRegistration>
-
setJwtValidatorFactory
public void setJwtValidatorFactory(Function<ClientRegistration, org.springframework.security.oauth2.core.OAuth2TokenValidator<org.springframework.security.oauth2.jwt.Jwt>> jwtValidatorFactory) Sets the factory that provides anOAuth2TokenValidator, which is used by theReactiveJwtDecoder. The default composesJwtTimestampValidatorandOidcIdTokenValidator.- Parameters:
jwtValidatorFactory- the factory that provides anOAuth2TokenValidator
-
setJwsAlgorithmResolver
public void setJwsAlgorithmResolver(Function<ClientRegistration, org.springframework.security.oauth2.jose.jws.JwsAlgorithm> jwsAlgorithmResolver) Sets the resolver that provides the expectedJWS algorithmused for the signature or MAC on theID Token. The default resolves toRS256for allclients.- Parameters:
jwsAlgorithmResolver- the resolver that provides the expectedJWS algorithmfor a specificclient
-
setClaimTypeConverterFactory
public void setClaimTypeConverterFactory(Function<ClientRegistration, org.springframework.core.convert.converter.Converter<Map<String, Object>, Map<String, Object>>> claimTypeConverterFactory) Sets the factory that provides aConverterused for type conversion of claim values for anOidcIdToken. The default isClaimTypeConverterfor allclients.- Parameters:
claimTypeConverterFactory- the factory that provides aConverterused for type conversion of claim values for a specificclient
-