Skip to content

Instantly share code, notes, and snippets.

@arcseldon
Created April 4, 2018 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arcseldon/b51dedeb82f9906815e6ac5d0b664291 to your computer and use it in GitHub Desktop.
Save arcseldon/b51dedeb82f9906815e6ac5d0b664291 to your computer and use it in GitHub Desktop.
Copy locally
package com.auth0;
import java.io.Serializable;
/**
* Holds the user's credentials returned by Auth0.
* <ul>
* <li><i>idToken</i>: Identity Token with user information</li>
* <li><i>accessToken</i>: Access Token for Auth0 API</li>
* <li><i>type</i>: Token Type</li>
* <li><i>refreshToken</i>: Refresh Token that can be used to request new tokens without signing in again</li>
* </ul>
*/
public class Tokens implements Serializable {
private static final long serialVersionUID = 2371882820082543721L;
private String idToken;
private String accessToken;
private String type;
private String refreshToken;
/**
*
* @param idToken identity token with user information
* @param accessToken access token for Auth0 API
* @param type token type
* @param refreshToken refresh token that can be used to request new tokens without signing in again
*/
public Tokens(final String idToken, final String accessToken, final String type, final String refreshToken) {
this.idToken = idToken;
this.accessToken = accessToken;
this.type = type;
this.refreshToken = refreshToken;
}
public String getIdToken() {
return idToken;
}
public String getAccessToken() {
return accessToken;
}
public String getType() {
return type;
}
public String getRefreshToken() {
return refreshToken;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment