public final class ReactiveOidcIdTokenDecoderFactory extends java.lang.Object implements ReactiveJwtDecoderFactory<ClientRegistration>
factory
that provides a ReactiveJwtDecoder
used for OidcIdToken
signature verification.
The provided ReactiveJwtDecoder
is associated to a specific ClientRegistration
.ReactiveJwtDecoderFactory
,
ClientRegistration
,
OidcIdToken
Constructor and Description |
---|
ReactiveOidcIdTokenDecoderFactory() |
Modifier and Type | Method and Description |
---|---|
ReactiveJwtDecoder |
createDecoder(ClientRegistration clientRegistration)
Creates a
ReactiveJwtDecoder using the supplied "contextual" type. |
static java.util.Map<java.lang.String,org.springframework.core.convert.converter.Converter<java.lang.Object,?>> |
createDefaultClaimTypeConverters()
Returns the default
Converter 's used for type conversion of claim values for an OidcIdToken . |
void |
setClaimTypeConverterFactory(java.util.function.Function<ClientRegistration,org.springframework.core.convert.converter.Converter<java.util.Map<java.lang.String,java.lang.Object>,java.util.Map<java.lang.String,java.lang.Object>>> claimTypeConverterFactory)
Sets the factory that provides a
Converter used for type conversion of claim values for an OidcIdToken . |
void |
setJwsAlgorithmResolver(java.util.function.Function<ClientRegistration,JwsAlgorithm> jwsAlgorithmResolver)
Sets the resolver that provides the expected
JWS algorithm
used for the signature or MAC on the ID Token . |
void |
setJwtValidatorFactory(java.util.function.Function<ClientRegistration,OAuth2TokenValidator<Jwt>> jwtValidatorFactory)
Sets the factory that provides an
OAuth2TokenValidator , which is used by the ReactiveJwtDecoder . |
public static java.util.Map<java.lang.String,org.springframework.core.convert.converter.Converter<java.lang.Object,?>> createDefaultClaimTypeConverters()
Converter
's used for type conversion of claim values for an OidcIdToken
.Map
of Converter
's keyed by claim name
public ReactiveJwtDecoder createDecoder(ClientRegistration clientRegistration)
ReactiveJwtDecoderFactory
ReactiveJwtDecoder
using the supplied "contextual" type.createDecoder
in interface ReactiveJwtDecoderFactory<ClientRegistration>
clientRegistration
- the type that provides contextual informationReactiveJwtDecoder
public void setJwtValidatorFactory(java.util.function.Function<ClientRegistration,OAuth2TokenValidator<Jwt>> jwtValidatorFactory)
OAuth2TokenValidator
, which is used by the ReactiveJwtDecoder
.
The default composes JwtTimestampValidator
and OidcIdTokenValidator
.jwtValidatorFactory
- the factory that provides an OAuth2TokenValidator
public void setJwsAlgorithmResolver(java.util.function.Function<ClientRegistration,JwsAlgorithm> jwsAlgorithmResolver)
JWS algorithm
used for the signature or MAC on the ID Token
.
The default resolves to RS256
for all clients
.jwsAlgorithmResolver
- the resolver that provides the expected JWS algorithm
for a specific client
public void setClaimTypeConverterFactory(java.util.function.Function<ClientRegistration,org.springframework.core.convert.converter.Converter<java.util.Map<java.lang.String,java.lang.Object>,java.util.Map<java.lang.String,java.lang.Object>>> claimTypeConverterFactory)
Converter
used for type conversion of claim values for an OidcIdToken
.
The default is ClaimTypeConverter
for all clients
.claimTypeConverterFactory
- the factory that provides a Converter
used for type conversion
of claim values for a specific client