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

Add OAuth2AuthenticatedPrincipal #7342

Closed
jzheaux opened this issue Sep 3, 2019 · 0 comments
Closed

Add OAuth2AuthenticatedPrincipal #7342

jzheaux opened this issue Sep 3, 2019 · 0 comments
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 3, 2019

Oftentimes, an OAuth 2.0 token does not precisely represent a user. It'd be nice to have a domain object different from OAuth2User that represented the attributes and authorities tied to the token's principal.

For example, resource servers deal with JWTs and Opaque Tokens.

The JWT RFC states that the sub claim is (emphasis mine):

The "sub" (subject) claim identifies the principal that is the subject of the JWT.

And the Introspection RFC states that it is based off of JWT:

Subject of the token, as defined in JWT [RFC7519].

Given that both specs, then, refer to this as the principal, and that this principal would need to extend AuthenticatedPrincipal, then OAuth2AuthenticatedPrincipal is a reasonable name.

@jzheaux jzheaux added the in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) label Sep 3, 2019
@jzheaux jzheaux self-assigned this Sep 3, 2019
@jzheaux jzheaux added the type: enhancement A general enhancement label Sep 3, 2019
@jzheaux jzheaux added this to the 5.2.0.RC1 milestone Sep 3, 2019
jzheaux added a commit to jzheaux/spring-security that referenced this issue Sep 3, 2019
@jzheaux jzheaux closed this as completed in 346b8c2 Sep 3, 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

No branches or pull requests

1 participant