Skip to content

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
@sjohnr
Copy link
Contributor

sjohnr commented Apr 9, 2025

@jloisel I'm going to close this PR based on this and other comments in gh-16340.

@sjohnr sjohnr closed this Apr 9, 2025
@sjohnr sjohnr added type: bug A general bug status: declined A suggestion or change that we don't feel we should currently apply in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) status: declined A suggestion or change that we don't feel we should currently apply type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants