Class AccessToken

java.lang.Object
com.azure.core.credential.AccessToken

public class AccessToken extends Object
Represents an immutable access token with a token string and an expiration time.
  • Constructor Details

    • AccessToken

      public AccessToken(String token, OffsetDateTime expiresAt)
      Creates an access token instance.
      Parameters:
      token - the token string.
      expiresAt - the expiration time.
  • Method Details

    • getToken

      public String getToken()
      Returns:
      the token string.
    • getExpiresAt

      public OffsetDateTime getExpiresAt()
      Returns:
      the time when the token expires, in UTC.
    • isExpired

      public boolean isExpired()
      Returns:
      if the token has expired.