Skip to content

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

Conversation

HaydenMeloche
Copy link
Contributor

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 21, 2019
@rwinch rwinch requested a review from jzheaux May 21, 2019 20:39
Copy link
Contributor

@jzheaux jzheaux left a 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.

@jzheaux jzheaux added in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) status: duplicate A duplicate of another issue type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels May 21, 2019
@jzheaux jzheaux self-assigned this May 21, 2019
@jzheaux jzheaux added this to the 5.2.x milestone May 21, 2019
@HaydenMeloche HaydenMeloche force-pushed the jwt-authentication-token-custom-name branch from bb79f1b to 5f1ec2a Compare May 22, 2019 23:26
@HaydenMeloche
Copy link
Contributor Author

@jzheaux Thanks for your review, I believe I made all the changes you requested. Can you take another look? 😄

@HaydenMeloche HaydenMeloche force-pushed the jwt-authentication-token-custom-name branch from 5f1ec2a to d86eec8 Compare May 22, 2019 23:29
@jzheaux jzheaux closed this in f84ab3a May 23, 2019
jzheaux added a commit that referenced this pull request May 23, 2019
Aligned JavaDoc and added tests to better assess getName's
functionality.

Issue: gh-6893
jzheaux added a commit that referenced this pull request May 23, 2019
Using Jwt.Builder to clean up some of this test's config.

Issue: gh-6893
@jzheaux
Copy link
Contributor

jzheaux commented May 23, 2019

Thanks for the PR, @HaydenMeloche! This is now merged into master via f84ab3a. Also, I added a polish commit of 936d28d.

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: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add constructor to JwtAuthenticationToken that takes a principal name
3 participants