new AccessToken()
AccessToken extension to the User interface
Methods
-
expired() → {boolean}
-
Check if the access token is expired or not.
Returns:
- Type
- boolean
-
refresh(callback) → {AccessToken}
-
Refresh the access token
Parameters:
Name Type Description callback
function The callback function returning the results. Returns:
- Type
- AccessToken
-
revoke(token_type, callback) → {AccessToken}
-
Revoke access or refresh token
Parameters:
Name Type Description token_type
string A String containing the type of token to revoke. Should be either "access_token" or "refresh_token". callback
function The callback function returning the results. Returns:
- Type
- AccessToken