Created
April 4, 2018 10:23
-
-
Save arcseldon/b51dedeb82f9906815e6ac5d0b664291 to your computer and use it in GitHub Desktop.
Copy locally
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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