com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class OAuthToken



  • public class OAuthToken
    extends Object

    Contains OAuth token data such like token value, token type, expiration date.

    • Constructor Detail

      • OAuthToken

        public OAuthToken(String token)

        Initializes a new instance of the OAuthToken class

        Parameters:
        token - Refresh token value
      • OAuthToken

        public OAuthToken(String token,
                  Date expirationDate)

        Initializes a new instance of the OAuthToken class

        Parameters:
        token - Access token value
        expirationDate - Expiration date of the token.
      • OAuthToken

        public OAuthToken(String token,
                  int tokenType,
                  Date expirationDate)

        Initializes a new instance of the OAuthToken class

        Parameters:
        token - Token value
        tokenType - OAuth token type
        expirationDate - Expiration date of the token.
    • Method Detail

      • getTokenType

        public final int getTokenType()

        Gets OAuth token type

      • getToken

        public final String getToken()

        Gets token value

      • getExpirationDate

        public final Date getExpirationDate()

        Gets expiration date of the token.

      • getExpired

        public final boolean getExpired()

        Indicates whether token is expired

      • equals

        public boolean equals(Object obj)

        Determines whether the specified object is equal to the current object.

        Overrides:
        equals in class Object
        Parameters:
        obj - The object to compare with the current object.
        Returns:
        true if the specified object is equal to the current object; otherwise, false.
      • hashCode

        public int hashCode()

        Serves as a hash function for a particular type.

        Overrides:
        hashCode in class Object
        Returns:
        A hash code for the current object.
      • toString

        public String toString()

        Returns a string that represents the current object.

        Overrides:
        toString in class Object
        Returns:
        A string that represents the current object.