Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Security] set configured claim as userIdentifier on OidcUser using OidcUserInfoTokenHandler#52625

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
smatyas wants to merge1 commit intosymfony:7.4
base:7.4
Choose a base branch
Loading
fromsmatyas:patch-1

Conversation

smatyas
Copy link
Contributor

@smatyassmatyas commentedNov 17, 2023
edited
Loading

QA
Branch?7.1
Bug fix?yes
New feature?no
Deprecations?no
Issues
LicenseMIT

As I was trying to use theoidc_user_info token handler with a customclaim setting, I noticed (debugged) that the specified claim is only set on theUserBadge, but not on the actualOidcUser object. The latter gets the original$claims array as the constructor parameters through the\Symfony\Component\Security\Http\AccessToken\Oidc\OidcTrait::createUser, that's why the selected claim does not get set currently.

This patch does solve this case.


I.e. using this examplefrom the doc does not set theemail claim asOidcUser::userIdentifier, that property will never be set.

# config/packages/security.yamlsecurity:    firewalls:        main:            access_token:                token_handler:                    oidc_user_info:                        claim: email                        base_uri: https://www.example.com/realms/demo/protocol/openid-connect/userinfo

Please let me know if it's not the intended way to set up the user class.

If this is should be the correct flow (as I assume), I'm willing to cover it with tests in this PR.

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

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

3 participants
@smatyas@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp