Interface OAuth2AuthenticatedPrincipal
-
- All Superinterfaces:
org.springframework.security.core.AuthenticatedPrincipal
- All Known Subinterfaces:
OAuth2User,OidcUser
- All Known Implementing Classes:
DefaultOAuth2AuthenticatedPrincipal,DefaultOAuth2User,DefaultOidcUser
public interface OAuth2AuthenticatedPrincipal extends org.springframework.security.core.AuthenticatedPrincipalAnAuthenticatedPrincipalthat represents the principal associated with an OAuth 2.0 token.- Since:
- 5.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <A> AgetAttribute(java.lang.String name)Get the OAuth 2.0 token attribute by namejava.util.Map<java.lang.String,java.lang.Object>getAttributes()Get the OAuth 2.0 token attributesjava.util.Collection<? extends org.springframework.security.core.GrantedAuthority>getAuthorities()Get theCollectionofGrantedAuthoritys associated with this OAuth 2.0 token
-
-
-
Method Detail
-
getAttribute
@Nullable default <A> A getAttribute(java.lang.String name)
Get the OAuth 2.0 token attribute by name- Type Parameters:
A- the type of the attribute- Parameters:
name- the name of the attribute- Returns:
- the attribute or
nullotherwise
-
getAttributes
java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Get the OAuth 2.0 token attributes- Returns:
- the OAuth 2.0 token attributes
-
getAuthorities
java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
Get theCollectionofGrantedAuthoritys associated with this OAuth 2.0 token- Returns:
- the OAuth 2.0 token authorities
-
-