Package com.auth0.json.auth
Class TokenHolder
java.lang.Object
com.auth0.json.auth.TokenHolder
Class that contains the Tokens obtained after a call to the
AuthAPI methods.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for the Auth0's access token.Get the expiration date of the Access Token.longGetter for the duration of the Access Token token in seconds from the time it was issued.Getter for the Auth0's id token.Getter for the Auth0's refresh token.getScope()Gets the granted scope value for this token.Getter for the token type.
-
Constructor Details
-
TokenHolder
public TokenHolder() -
TokenHolder
-
-
Method Details
-
getAccessToken
Getter for the Auth0's access token.- Returns:
- the access token or null if missing.
-
getIdToken
Getter for the Auth0's id token.- Returns:
- the id token or null if missing.
-
getRefreshToken
Getter for the Auth0's refresh token.- Returns:
- the refresh token or null if missing.
-
getTokenType
Getter for the token type.- Returns:
- the token type or null if missing.
-
getExpiresIn
public long getExpiresIn()Getter for the duration of the Access Token token in seconds from the time it was issued. If no Access Token was present the value will be zero.- Returns:
- the number of seconds in which the Access Token token will expire, from the time it was issued.
-
getExpiresAt
Get the expiration date of the Access Token. This value is not part of the actual token response from the API, but rather is calculated and provided for convenience.- Returns:
- the date of the Access Token's expiration. If no Access Token was present on the response, returns
null
-
getScope
Gets the granted scope value for this token.- Returns:
- a space-delimited string of the granted scopes of this token.
-