Class AccessToken


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

      Constructors 
      Constructor Description
      AccessToken​(java.lang.String token, org.threeten.bp.OffsetDateTime expiresAt)
      Creates an access token instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.threeten.bp.OffsetDateTime getExpiresAt()  
      java.lang.String getToken()  
      boolean isExpired()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AccessToken

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

      • getToken

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

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

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