+
Skip to content

Conversation

adhamahmad
Copy link
Contributor

Related to #32157

Summary

Implements the UserAttributeToScopeMapper proposed in issue #32157.
This mapper allows mapping a user attribute into the token scope field as claim:value.

Details

Includes duplicate handling to prevent multiple identical entries in the scope.

Questions

I'd like feedback on whether this should:

  1. Stay as a dedicated mapper, or
  2. Be added as an option in the existing UserAttributeMapper.

Related issue: #32157
cc @stianst

@frademacher
Copy link

Thanks for working on integrating this suggested improvement into upstream, @adhamahmad :-)

And additionally, thank you for adding the duplicate check to my original code! Since the code, for the most part, still relies on my original suggestion, please credit me as a Co-author. Thanks!

@adhamahmad adhamahmad force-pushed the feature/user-attribute-to-scope-mapper branch from 8e208f3 to 6bc520d Compare October 13, 2025 17:33
Related to keycloak#32157

Co-authored-by: Florian Rademacher <florian.rademacher@codecentric.de>
Signed-off-by: Adham Ahmed Hussein Mahrous <adhamahmad541@gmail.com>
@adhamahmad adhamahmad force-pushed the feature/user-attribute-to-scope-mapper branch from 6bc520d to 09db870 Compare October 13, 2025 17:50
@adhamahmad
Copy link
Contributor Author

Thanks @frademacher for your your original implementation!

I’ve amended the commit to include you as a co-author.

@frademacher
Copy link

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载