Class TokenHolder

java.lang.Object
com.auth0.json.auth.TokenHolder

public class TokenHolder extends Object
Class that contains the Tokens obtained after a call to the AuthAPI methods.
  • Constructor Details

    • TokenHolder

      public TokenHolder()
    • TokenHolder

      public TokenHolder(String accessToken, String idToken, String refreshToken, String tokenType, long expiresIn, String scope, Date expiresAt)
  • Method Details

    • getAccessToken

      public String getAccessToken()
      Getter for the Auth0's access token.
      Returns:
      the access token or null if missing.
    • getIdToken

      public String getIdToken()
      Getter for the Auth0's id token.
      Returns:
      the id token or null if missing.
    • getRefreshToken

      public String getRefreshToken()
      Getter for the Auth0's refresh token.
      Returns:
      the refresh token or null if missing.
    • getTokenType

      public String 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

      public Date 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

      public String getScope()
      Gets the granted scope value for this token.
      Returns:
      a space-delimited string of the granted scopes of this token.