Related to #5200 and https://github.com/spring-projects/spring-security/pull/6352#discussion_r251856850
One way to simplify would be by creating an IntrospectionClaimAccessor similar to JwtClaimAccessor.
Comment From: qavid
Hi @jzheaux, I would like to work on this issue, could you please provide more details?
Comment From: jzheaux
@qavid - I took a look at your commit, and I like where you seem to be headed with it. Can you clarify where you'd like additional detail?
Comment From: jzheaux
@qavid are you still thinking about submitting a PR for this issue?
Comment From: qavid
@jzheaux I would really like to, but i don't have much time. I'll try this weekend and I will let you know.
Comment From: qavid
Hi @jzheaux, I have submitted PR, but I have one question. Documentation for AuthenticatedPrincipal#getName states that returned name is never null but according to RFC7519 (JWT) and RFC7662 (Token Introspection) SUB claim is in both cases optional. What should be returned in case there isn't SUB claim in JWT or Token Introspection? Previous implementation of DefaultOAuth2AuthenticatedPrincipal would also return null in this case.
I wasn't sure if DefaultOAuth2AuthenticatedPrincipal should be removed so I have removed it in a separate commit.