There are 3 pending PRs adding support for overriding an official claim based on another existing claim in the token:
Each provides a different configuration model and a different implementation. Ideally, they should follow the same pattern.
In the configuration, each introduces a new config key (following different naming conventions). I would either like to see a unified naming convention, or better yet, a new section for mapping config, something like this:
claimMapping:
preferred_username: other_user_name
email: mail
groups: "cognito:groups"
On the implementation side I like the idea to restrict changing the claim, if it's already present. Standard OIDC claims must always take precedence. (Both #1691 and #1776 are in violation of that requirement at the moment)
Existing configuration (like usernameKey) should be deprecated and the new config structure should take precedence.
On the implementation side, I like the style of #1634, we should probably pursue that.
Last, but not least: tests are must have.
@xtremerui , @cyrilix , @Lemmons can you please collaborate on this one? I'd like to hear your opinions as well and preferably reach a consensus before merging those PRs. Thanks!
There are 3 pending PRs adding support for overriding an official claim based on another existing claim in the token:
Each provides a different configuration model and a different implementation. Ideally, they should follow the same pattern.
In the configuration, each introduces a new config key (following different naming conventions). I would either like to see a unified naming convention, or better yet, a new section for mapping config, something like this:
On the implementation side I like the idea to restrict changing the claim, if it's already present. Standard OIDC claims must always take precedence. (Both #1691 and #1776 are in violation of that requirement at the moment)
Existing configuration (like
usernameKey) should be deprecated and the new config structure should take precedence.On the implementation side, I like the style of #1634, we should probably pursue that.
Last, but not least: tests are must have.
@xtremerui , @cyrilix , @Lemmons can you please collaborate on this one? I'd like to hear your opinions as well and preferably reach a consensus before merging those PRs. Thanks!