public class OAuthToken extends Object
Contains OAuth token data such like token value, token type, expiration date.
Constructor and Description |
---|
OAuthToken(String token)
Initializes a new instance of the
OAuthToken class |
OAuthToken(String token,
Date expirationDate)
Initializes a new instance of the
OAuthToken class |
OAuthToken(String token,
int tokenType,
Date expirationDate)
Initializes a new instance of the
OAuthToken class |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Determines whether the specified object is equal to the current object.
|
Date |
getExpirationDate()
Gets expiration date of the token.
|
boolean |
getExpired()
Indicates whether token is expired
|
String |
getToken()
Gets token value
|
int |
getTokenType()
Gets OAuth token type
|
int |
hashCode()
Serves as a hash function for a particular type.
|
String |
toString()
Returns a string that represents the current object.
|
public OAuthToken(String token)
Initializes a new instance of the OAuthToken
class
token
- Refresh token valuepublic OAuthToken(String token, Date expirationDate)
Initializes a new instance of the OAuthToken
class
token
- Access token valueexpirationDate
- Expiration date of the token.public OAuthToken(String token, int tokenType, Date expirationDate)
Initializes a new instance of the OAuthToken
class
token
- Token valuetokenType
- OAuth token typeexpirationDate
- Expiration date of the token.public final int getTokenType()
Gets OAuth token type
public final String getToken()
Gets token value
public final Date getExpirationDate()
Gets expiration date of the token.
public final boolean getExpired()
Indicates whether token is expired
public boolean equals(Object obj)
Determines whether the specified object is equal to the current object.
public int hashCode()
Serves as a hash function for a particular type.