Skip to content

OAuth2User should extend OAuth2AuthenticatedPrincipal #7378

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

Closed
jzheaux opened this issue Sep 5, 2019 · 0 comments · Fixed by #7383
Closed

OAuth2User should extend OAuth2AuthenticatedPrincipal #7378

jzheaux opened this issue Sep 5, 2019 · 0 comments · Fixed by #7383
Assignees
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement
Milestone

Comments

@jzheaux
Copy link
Contributor

jzheaux commented Sep 5, 2019

OAuth2AuthenticatedPrincipal is an AuthenticatedPrincipal that adds getAuthorities as well as getAttributes. It represents the principal associated with an OAuth 2.0 token.

A user is a type of principal, so having OAuth2User extend OAuth2AuthenticatedPrincipal makes sense.

Additionally, it will reduce the code that OAuth2User needs to maintain, plus it will get the nice benefit of a getAttribute default method.

@jzheaux jzheaux added type: enhancement A general enhancement in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) labels Sep 5, 2019
@jzheaux jzheaux added this to the 5.2.0 milestone Sep 5, 2019
eddumelendez added a commit to eddumelendez/spring-security that referenced this issue Sep 8, 2019
@jzheaux jzheaux self-assigned this Sep 29, 2019
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) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant