Add OAuth2AuthenticatedPrincipal #7342
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
type: enhancement
A general enhancement
Milestone
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):
And the Introspection RFC states that it is based off of JWT:
Given that both specs, then, refer to this as the principal, and that this principal would need to extend
AuthenticatedPrincipal
, thenOAuth2AuthenticatedPrincipal
is a reasonable name.The text was updated successfully, but these errors were encountered: