mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-25 13:32:30 +00:00
Polish Type Conversion API
Issue gh-6245
This commit is contained in:
parent
0560863320
commit
b648a24f5f
@ -78,8 +78,7 @@ public final class OidcIdTokenDecoderFactory implements JwtDecoderFactory<Client
|
||||
JCA_ALGORITHM_MAPPINGS = Collections.unmodifiableMap(mappings);
|
||||
};
|
||||
|
||||
private static final ClaimTypeConverter DEFAULT_CLAIM_TYPE_CONVERTER = new ClaimTypeConverter(
|
||||
createDefaultClaimTypeConverters());
|
||||
private static final ClaimTypeConverter DEFAULT_CLAIM_TYPE_CONVERTER = createDefaultClaimTypeConverter();
|
||||
|
||||
private final Map<String, JwtDecoder> jwtDecoders = new ConcurrentHashMap<>();
|
||||
|
||||
@ -94,6 +93,17 @@ public final class OidcIdTokenDecoderFactory implements JwtDecoderFactory<Client
|
||||
private Function<ClientRegistration, RestOperations> restOperationsFactory = (
|
||||
clientRegistration) -> new RestTemplate();
|
||||
|
||||
/**
|
||||
* Returns the default {@link Converter}'s used for type conversion of claim values
|
||||
* for an {@link OidcIdToken}.
|
||||
* @return a {@link Map} of {@link Converter}'s keyed by {@link IdTokenClaimNames
|
||||
* claim name}
|
||||
* @since 6.3
|
||||
*/
|
||||
public static ClaimTypeConverter createDefaultClaimTypeConverter() {
|
||||
return new ClaimTypeConverter(createDefaultClaimTypeConverters());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default {@link Converter}'s used for type conversion of claim values
|
||||
* for an {@link OidcIdToken}.
|
||||
|
Loading…
x
Reference in New Issue
Block a user