Package com.pingidentity.sdk.oauth20
Class AccessToken
java.lang.Object
com.pingidentity.sdk.oauth20.AccessToken
- All Implemented Interfaces:
Serializable
An access token that has been validated by the server -
generally by an instance of a
BearerAccessTokenManagementPlugin.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAccessToken(long expiresAt, Map<String, AttributeValue> attributes, String scopeString, String clientId, String accessGrantGuid) Constructor for the AccessToken.AccessToken(long expiresAt, Map<String, AttributeValue> attributes, String scopeString, String clientId, String accessGrantGuid, AuthorizationDetails authorizationDetails) Constructor for the AccessToken. -
Method Summary
Modifier and TypeMethodDescriptionGet the access grant GUID of this access token.Get the attributes of this access token.A list of identifiers representing the intended audience for this access token.Get the authorization details for this access token.Get the client ID of this access token.longReturns when this access token expires.Get the issuer of this access token.getScope()Get the scope of this access token.Get the unique identifier for this access token.booleanReturns whether or not this access token has an access grant GUID.booleanChecks whether or not this access token has expired.voidsetAudience(List<String> audience) Set the list of audience members this access token is intended for.voidsetExpiresAt(long exp) Set when this access token expires.voidSet the issuer of this access token.voidsetTokenIdentifier(String tokenIdentifier) Set the unique identifier for this access token.
-
Constructor Details
-
AccessToken
public AccessToken(long expiresAt, Map<String, AttributeValue> attributes, String scopeString, String clientId, String accessGrantGuid) Constructor for the AccessToken.- Parameters:
expiresAt- timestamp of when the access token expires.attributes- The attributes of this access token.scopeString- The scope of this access token.clientId- The client ID of this access token.accessGrantGuid- The access grant GUID of this access token.
-
AccessToken
public AccessToken(long expiresAt, Map<String, AttributeValue> attributes, String scopeString, String clientId, String accessGrantGuid, AuthorizationDetails authorizationDetails) Constructor for the AccessToken.- Parameters:
expiresAt- timestamp of when the access token expires.attributes- The attributes of this access token.scopeString- The scope of this access token.clientId- The client ID of this access token.accessGrantGuid- The access grant GUID of this access token.authorizationDetails- The authorization details of this access token.
-
-
Method Details
-
getExpiresAt
public long getExpiresAt()Returns when this access token expires.- Returns:
- When this access token expires.
-
setExpiresAt
public void setExpiresAt(long exp) Set when this access token expires.- Parameters:
exp- Timestamp of when this access token expires.
-
isExpired
public boolean isExpired()Checks whether or not this access token has expired.- Returns:
- True if this access token has expired, false otherwise.
-
getAttributes
Get the attributes of this access token.- Returns:
- The attributes of this access token.
-
getScope
Get the scope of this access token.- Returns:
- The scope of this access token.
-
getClientId
Get the client ID of this access token.- Returns:
- The client ID of this access token.
-
getAccessGrantGuid
Get the access grant GUID of this access token.- Returns:
- The access grant GUID of this access token.
-
hasAccessGrantGuid
public boolean hasAccessGrantGuid()Returns whether or not this access token has an access grant GUID.- Returns:
- True if the access token has a grant GUID, false otherwise.
-
getAudience
A list of identifiers representing the intended audience for this access token.- Returns:
- A list of identifiers that are the intended audience for this access token
-
setAudience
Set the list of audience members this access token is intended for.- Parameters:
audience- - List of audience members.
-
getIssuer
Get the issuer of this access token.- Returns:
- - The issuer of this access token.
-
setIssuer
Set the issuer of this access token.- Parameters:
issuer- - The issuer of this access token.
-
getTokenIdentifier
Get the unique identifier for this access token.- Returns:
- The unique identifier for this access token.
-
setTokenIdentifier
Set the unique identifier for this access token.- Parameters:
tokenIdentifier- - The unique identifier.
-
getAuthorizationDetails
Get the authorization details for this access token.- Returns:
- The authorization details for this access token.
-