Skip to content

Commit

Permalink
Default AuthenticatedPrincipal.getName implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
andreblanke committed Nov 24, 2024
1 parent 464b078 commit c92a4a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,9 @@ default <A> A getAttribute(String name) {
*/
String getNameAttributeKey();

@Override
default String getName() {
return getAttribute(getNameAttributeKey()).toString();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ public DefaultOAuth2User(Collection<? extends GrantedAuthority> authorities, Map
this.nameAttributeKey = nameAttributeKey;
}

@Override
public String getName() {
return this.getAttribute(this.nameAttributeKey).toString();
}

@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
return this.authorities;
Expand Down

0 comments on commit c92a4a0

Please sign in to comment.