Skip to content

Simplify support of username as a nested property #16390

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

Open
Tracked by #16378
rwinch opened this issue Jan 9, 2025 · 1 comment · May be fixed by #16857
Open
Tracked by #16378

Simplify support of username as a nested property #16390

rwinch opened this issue Jan 9, 2025 · 1 comment · May be fixed by #16857

Comments

@rwinch
Copy link
Member

rwinch commented Jan 9, 2025

For Spring Boot users who want to change the property of the User Info response that is used to create a username, they can easily change this by specifying the user-name-attribute. However, if the username is nested this does not work. For example, X wraps responses in a data property which means the username is data.username

{
  "data": {
    "id": "2244994945",
    "name": "TwitterDev",
    "username": "Twitter Dev"
  }
}

Unfortunately, this currently requires quite a bit more work than a non-nested property.

We could consider a way to access nested properties or to simplify transform the response so it is not nested (probably preferred).

@yybmion
Copy link

yybmion commented Mar 30, 2025

Hi @rwinch, I'd like to work on this issue - could you please assign it to me?

yybmion added a commit to yybmion/spring-security that referenced this issue Apr 1, 2025
Implement the ability to use dot notation in user-name-attribute
to access nested properties in OAuth2 user info responses.

Closes spring-projectsgh-16390

Signed-off-by: yybmion <[email protected]>
yybmion added a commit to yybmion/spring-security that referenced this issue Apr 2, 2025
Implement the ability to use dot notation in user-name-attribute
to access nested properties in OAuth2 user info responses.

Closes spring-projectsgh-16390

Signed-off-by: yybmion <[email protected]>
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 a pull request may close this issue.

2 participants