public final class OidcIdTokenDecoderFactory extends java.lang.Object implements JwtDecoderFactory<ClientRegistration>
factory that provides a JwtDecoder
used for OidcIdToken signature verification.
The provided JwtDecoder is associated to a specific ClientRegistration.JwtDecoderFactory,
ClientRegistration,
OidcIdToken| Constructor and Description |
|---|
OidcIdTokenDecoderFactory() |
| Modifier and Type | Method and Description |
|---|---|
JwtDecoder |
createDecoder(ClientRegistration clientRegistration)
Creates a
JwtDecoder 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 JwtDecoder. |
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 namepublic JwtDecoder createDecoder(ClientRegistration clientRegistration)
JwtDecoderFactoryJwtDecoder using the supplied "contextual" type.createDecoder in interface JwtDecoderFactory<ClientRegistration>clientRegistration - the type that provides contextual informationJwtDecoderpublic void setJwtValidatorFactory(java.util.function.Function<ClientRegistration,OAuth2TokenValidator<Jwt>> jwtValidatorFactory)
OAuth2TokenValidator, which is used by the JwtDecoder.
The default composes JwtTimestampValidator and OidcIdTokenValidator.jwtValidatorFactory - the factory that provides an OAuth2TokenValidatorpublic 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 clientpublic 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