Last active
September 7, 2020 16:00
-
-
Save ArnauMrJeff/fe81cc73cb320f95b2c4e79995aec052 to your computer and use it in GitHub Desktop.
Apple ID Sign In: TokenResponse
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
import com.fasterxml.jackson.annotation.JsonProperty; | |
public final class TokenResponse { | |
private final String idToken; | |
private final String accessToken; | |
private final String tokenType; | |
private final Long expiresIn; | |
private final String refreshToken; | |
public TokenResponse(@JsonProperty("id_token") String idToken, | |
@JsonProperty("access_token") String accessToken, | |
@JsonProperty("token_type") String tokenType, | |
@JsonProperty("expires_in") Long expiresIn, | |
@JsonProperty("refresh_token") String refreshToken) { | |
this.idToken = idToken; | |
this.accessToken = accessToken; | |
this.tokenType = tokenType; | |
this.expiresIn = expiresIn; | |
this.refreshToken = refreshToken; | |
} | |
public String getIdToken() { | |
return idToken; | |
} | |
public String getAccessToken() { | |
return accessToken; | |
} | |
public String getTokenType() { | |
return tokenType; | |
} | |
public Long getExpiresIn() { | |
return expiresIn; | |
} | |
public String getRefreshToken() { | |
return refreshToken; | |
} | |
@Override | |
public String toString() { | |
return "TokenResponse{" + | |
"idToken='" + idToken + '\'' + | |
", accessToken='" + accessToken + '\'' + | |
", tokenType='" + tokenType + '\'' + | |
", expiresIn=" + expiresIn + | |
", refreshToken='" + refreshToken + '\'' + | |
'}'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment