Skip to content

Provide AuthenticatedPrincipal abstraction #4268

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

Merged
merged 3 commits into from
Apr 10, 2017

Conversation

jgrandja
Copy link
Contributor

@jgrandja jgrandja commented Apr 7, 2017

The goal for the AuthenticatedPrincipal abstraction is to decouple Principal type of abstractions from AbstractAuthenticationToken, specifically AbstractAuthenticationToken.getName().

As of now we are referencing UserDetails in AbstractAuthenticationToken.getName() and it would be nice to abstract this away to a generic interface that would provide the name of the Principal for any representation of a Principal, for example, UserDetails, OAuth2 User, OpenID Connect User, etc.

jgrandja added 2 commits April 7, 2017 16:49
* Spring IO Athens-BUILD-SNAPSHOT -> Cairo-BUILD-SNAPSHOT
* CGLib 3.1 -> 3.2.5 latest release Issue related to ASM cglib/cglib#20
* AssertJ 2.2.0 -> 3.6.2 latest release
* PowerMock 1.6.2 -> 1.6.5 latest release is 1.6.6 but has regression Issue powermock/powermock#717
* Update maven-compiler-plugin source/target to 1.8
@jgrandja jgrandja added the in: core An issue in spring-security-core label Apr 7, 2017
@jgrandja jgrandja added this to the 5.0.0.M1 milestone Apr 7, 2017
*
* @return the identifier for the authenticated <code>Principal</code>
*/
String getId();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need an id, so we shouldn't have it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getId() has been removed

@rwinch
Copy link
Member

rwinch commented Apr 10, 2017

Thanks...that's all the feedback I had. Given we discussed the id and you agreed go ahead and make that change and then you can merge :)

@jgrandja jgrandja changed the title Provide NamedPrincipal abstraction Provide AuthenticatedPrincipal abstraction Apr 10, 2017
@jgrandja jgrandja merged commit 71e491f into spring-projects:master Apr 10, 2017
@jgrandja jgrandja deleted the named-principal branch April 11, 2017 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core An issue in spring-security-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants