Interface Oauth2AuthenticatedPrincipal

All Superinterfaces:
AuthenticatedObject
All Known Implementing Classes:
DefaultOauth2AuthenticatedPrincipal

public interface Oauth2AuthenticatedPrincipal extends AuthenticatedObject
Since:
2022.1
Author:
CJ (power4j@outlook.com)
  • Method Details

    • getAttribute

      @Nullable default <A> A getAttribute(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 null otherwise
    • getAttributes

      Map<String,Object> getAttributes()
      Get the OAuth 2.0 token attributes
      Returns:
      the OAuth 2.0 token attributes
    • getAuthorities

      Collection<? extends GrantedPermission> getAuthorities()
      Get the Collection of GrantedPermissions associated with this OAuth 2.0 token
      Returns:
      the OAuth 2.0 token authorities