Package com.azure.spring.aad
Class AADOAuth2AuthenticatedPrincipal
- java.lang.Object
-
- com.azure.spring.aad.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 Summary
Constructors Constructor Description AADOAuth2AuthenticatedPrincipal(Map<String,Object> headers, Map<String,Object> attributes, Collection<org.springframework.security.core.GrantedAuthority> authorities, String tokenValue, String name)Creates a new instance ofAADOAuth2AuthenticatedPrincipal.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>getAttributes()Collection<? extends org.springframework.security.core.GrantedAuthority>getAuthorities()ObjectgetClaim(String name)Gets a claim.Map<String,Object>getClaims()Gets the claims.Map<String,Object>getHeaders()Gets the headers.StringgetIssuer()Gets the issuer.com.nimbusds.jwt.JWTClaimsSetgetJwtClaimsSet()Gets the JWT claims set.StringgetName()StringgetSubject()Gets the subject.StringgetTenantId()Gets the tenant ID.StringgetTokenValue()Gets the token value.booleanisPersonalAccount()Whether the principal is a personal account.
-
-
-
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 ofAADOAuth2AuthenticatedPrincipal.- Parameters:
headers- the headersattributes- the attributesauthorities- the authoritiestokenValue- the token valuename- the name
-
-
Method Detail
-
getAttributes
public Map<String,Object> getAttributes()
- Specified by:
getAttributesin interfaceorg.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
-
getAuthorities
public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
- Specified by:
getAuthoritiesin interfaceorg.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
-
getName
public String getName()
- Specified by:
getNamein interfaceorg.springframework.security.core.AuthenticatedPrincipal
-
getTokenValue
public String getTokenValue()
Gets the token value.- Returns:
- the token value
-
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
-
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
-
-