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

Adds UserDetails to Authentication #109

Closed
wants to merge 1 commit into from

Conversation

EliuX
Copy link

@EliuX EliuX commented Feb 19, 2018

Adding the UserDetails object to the Authentication of the session allows more flexibility; e.g. custom loaded data can be use along the session by doing

CustomUserDetails details = (CustomUserDetails) SecurityContextHolder.getContext().getAuthentication().getDetails();
Object value = details.getSpecialAttribute();
details.doCustomAction();
//etc.

Adding the `UserDetails` object to the `Authentication` of the session allows more flexibility; e.g. custom loaded data can be use along the session by doing
@pivotal-issuemaster
Copy link

@EliuX Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@EliuX Thank you for signing the Contributor License Agreement!

@gregturn
Copy link
Contributor

That looks great @EliuX. Any chance you could craft a test corresponding test case to illustrate it's value (and ensure nothing breaks)?

@gregturn gregturn changed the base branch from master to main April 7, 2021 15:51
@gregturn gregturn closed this in 52c7ee0 Apr 5, 2023
@gregturn gregturn self-assigned this Apr 5, 2023
@gregturn gregturn added this to the 4.0.3 milestone Apr 5, 2023
gregturn pushed a commit that referenced this pull request Apr 5, 2023
Add the `UserDetails` object to the `Authentication` during Spring Security password callbacks.

Resolves #109.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants