public interface AccessToken
Modifier and Type | Interface and Description |
---|---|
static class |
AccessToken.Factory
Factory class for instantiating Access token
|
Modifier and Type | Method and Description |
---|---|
Date |
accessTokenExpiresAt()
Get expire time for access token
|
void |
clearAccessToken()
Clear access token and its expire time.
|
void |
clearRefreshToken()
Clear refresh token and its expire time.
|
String |
getAccessToken()
Get access token.
|
String |
getRefreshToken()
Get refresh token.
|
int |
getRemainingExpireTime()
Get remaining expire time for access token in milliseconds
|
boolean |
hasValidAccessToken()
check if access token is valid or not by its expiration time.
|
boolean |
hasValidRefreshToken()
Check if refresh token is valid or not by its expiration time.
|
Date |
refreshTokenExpiresAt()
Get expire time for refresh token
|
void |
updateAccessToken(AccessToken accessToken)
Update global access token with the given one (which could just be POJO).
|
Date accessTokenExpiresAt()
void clearAccessToken()
void clearRefreshToken()
String getAccessToken()
String getRefreshToken()
int getRemainingExpireTime()
boolean hasValidAccessToken()
boolean hasValidRefreshToken()
Date refreshTokenExpiresAt()
void updateAccessToken(AccessToken accessToken)
accessToken
- AccessToken object