-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add constructor to JwtAuthenticationToken that takes a principal name #6893
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
Add constructor to JwtAuthenticationToken that takes a principal name #6893
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, great job, thank you for the PR, @HaydenMeloche!
I've left some feedback inline.
...g/springframework/security/oauth2/server/resource/authentication/JwtAuthenticationToken.java
Outdated
Show resolved
Hide resolved
...g/springframework/security/oauth2/server/resource/authentication/JwtAuthenticationToken.java
Outdated
Show resolved
Hide resolved
...g/springframework/security/oauth2/server/resource/authentication/JwtAuthenticationToken.java
Outdated
Show resolved
Hide resolved
...g/springframework/security/oauth2/server/resource/authentication/JwtAuthenticationToken.java
Outdated
Show resolved
Hide resolved
...g/springframework/security/oauth2/server/resource/authentication/JwtAuthenticationToken.java
Show resolved
Hide resolved
...ingframework/security/oauth2/server/resource/authentication/JwtAuthenticationTokenTests.java
Show resolved
Hide resolved
bb79f1b
to
5f1ec2a
Compare
@jzheaux Thanks for your review, I believe I made all the changes you requested. Can you take another look? 😄 |
5f1ec2a
to
d86eec8
Compare
Aligned JavaDoc and added tests to better assess getName's functionality. Issue: gh-6893
Using Jwt.Builder to clean up some of this test's config. Issue: gh-6893
Thanks for the PR, @HaydenMeloche! This is now merged into |
Closes #6865
I added two constructors to allow a custom principal name to be passed to the class. Otherwise the constructor will just set the name value to be token's subject.