Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug #16340: check username attribute when calling user.getName() (instead of checking in constructor) #16546

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jloisel
Copy link

@jloisel jloisel commented Feb 6, 2025

See: #16340

When first loaded, the oauth2 user has not the username attribute in his claims. For this reason, checking for the presence of this attribute in the constructor is too early. Once loaded from the userinfo endpoint, the oauth2 user has the username attribute.

I moved the check from constructor to getName() call to prevent this issue. Junits have been rewritten accordingly.

@jloisel jloisel changed the title Bug #16340: check username attribute when calling user.getName() Bug #16340: check username attribute when calling user.getName() (instead of checking in constructor) Feb 6, 2025
@jloisel jloisel force-pushed the fix-name-attribute-check branch from ddae9d2 to e957e39 Compare February 6, 2025 12:47
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants