spring-projects / spring-projects/spring-security
Simplify support of username as a nested property
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
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).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Spring Security handles the User Info response and the user-name-attribute setting. Reproduce the nested data.username example, then define and implement the chosen approach so a nested username can be used without the current extra work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- authentication
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100