Interface OAuth2AuthenticatedPrincipal
- All Superinterfaces:
AuthenticatedPrincipal
- All Known Subinterfaces:
OAuth2User, OidcUser
- All Known Implementing Classes:
DefaultOAuth2AuthenticatedPrincipal, DefaultOAuth2User, DefaultOidcUser, OAuth2IntrospectionAuthenticatedPrincipal
An
AuthenticatedPrincipal that represents the principal associated with an
OAuth 2.0 token.- Since:
- 5.2
-
Method Summary
Modifier and TypeMethodDescriptiondefault <A> @Nullable AgetAttribute(String name) Get the OAuth 2.0 token attribute by nameGet the OAuth 2.0 token attributesCollection<? extends GrantedAuthority> Get theCollectionofGrantedAuthoritys associated with this OAuth 2.0 tokenMethods inherited from interface AuthenticatedPrincipal
getName
-
Method Details
-
getAttribute
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
-
getAuthorities
Collection<? extends GrantedAuthority> getAuthorities()Get theCollectionofGrantedAuthoritys associated with this OAuth 2.0 token- Returns:
- the OAuth 2.0 token authorities
-