Class AADOAuth2AuthenticatedPrincipal

  • All Implemented Interfaces:
    Serializable, org.springframework.security.core.AuthenticatedPrincipal, org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal

    public class AADOAuth2AuthenticatedPrincipal
    extends Object
    implements org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal, Serializable
    Entity class of AADOAuth2AuthenticatedPrincipal
    See Also:
    Serialized Form
    • Constructor Detail

      • AADOAuth2AuthenticatedPrincipal

        public AADOAuth2AuthenticatedPrincipal​(Map<String,​Object> headers,
                                               Map<String,​Object> attributes,
                                               Collection<org.springframework.security.core.GrantedAuthority> authorities,
                                               String tokenValue,
                                               String name)
        Creates a new instance of AADOAuth2AuthenticatedPrincipal.
        Parameters:
        headers - the headers
        attributes - the attributes
        authorities - the authorities
        tokenValue - the token value
        name - the name
    • Method Detail

      • getAttributes

        public Map<String,​Object> getAttributes()
        Specified by:
        getAttributes in interface org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
      • getAuthorities

        public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
        Specified by:
        getAuthorities in interface org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
      • getName

        public String getName()
        Specified by:
        getName in interface org.springframework.security.core.AuthenticatedPrincipal
      • getTokenValue

        public String getTokenValue()
        Gets the token value.
        Returns:
        the token value
      • getHeaders

        public Map<String,​Object> getHeaders()
        Gets the headers.
        Returns:
        the headers
      • getJwtClaimsSet

        public com.nimbusds.jwt.JWTClaimsSet getJwtClaimsSet()
        Gets the JWT claims set.
        Returns:
        the JWT claims set
      • getIssuer

        public String getIssuer()
        Gets the issuer.
        Returns:
        the issuer
      • getSubject

        public String getSubject()
        Gets the subject.
        Returns:
        the subject
      • getClaims

        public Map<String,​Object> getClaims()
        Gets the claims.
        Returns:
        the claims
      • getClaim

        public Object getClaim​(String name)
        Gets a claim.
        Parameters:
        name - the name of the claim
        Returns:
        a claim
      • getTenantId

        public String getTenantId()
        Gets the tenant ID.
        Returns:
        the tenant ID
      • isPersonalAccount

        public boolean isPersonalAccount()
        Whether the principal is a personal account.
        Returns:
        whether the principal is a personal account