-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Closed
Labels
in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: enhancementA general enhancementA general enhancement
Milestone
Description
The methods in ClaimAccessor attempt to coerce a mapped value of Object to a specific type, for example:
getClaimAsBooleangetClaimAsInstantgetClaimAsURL
The coercion happens on each get which is not ideal. It would be more efficient if the coercion happened once and before the Map<String, Object> of claims is associated to the specific type of ClaimAccessor implementation at construction time. This change would apply to OidcIdToken, OidcUserInfo, and Jwt.
This capability is already implemented by MappedJwtClaimSetConverter, which is used by NimbusJwtDecoder to normalize the claims before it's associated to the Jwt.
We should reuse/share the logic in MappedJwtClaimSetConverter as part of this task. For example, the Converter implementations in MappedJwtClaimSetConverter should be reused.
jzheaux, sepanniemi and thorntonrp
Metadata
Metadata
Assignees
Labels
in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: enhancementA general enhancementA general enhancement