Package com.azure.core.credential
Class AccessToken
java.lang.Object
com.azure.core.credential.AccessToken
Represents an immutable access token with a token string and an expiration time.
-
Constructor Summary
ConstructorsConstructorDescriptionAccessToken
(String token, OffsetDateTime expiresAt) Creates an access token instance. -
Method Summary
-
Constructor Details
-
AccessToken
Creates an access token instance.- Parameters:
token
- the token string.expiresAt
- the expiration time.
-
-
Method Details
-
getToken
- Returns:
- the token string.
-
getExpiresAt
- Returns:
- the time when the token expires, in UTC.
-
isExpired
public boolean isExpired()- Returns:
- if the token has expired.
-