Class AccessToken


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

      • AccessToken

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

      • 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.