public class GoogleTokenResponse
extends com.google.api.client.auth.oauth2.TokenResponse
This response object is the result of GoogleAuthorizationCodeTokenRequest.execute() and
GoogleRefreshTokenRequest.execute(). Use parseIdToken() to parse the
GoogleIdToken and then call
GoogleIdTokenVerifier.verify(GoogleIdToken).
Implementation is not thread-safe.
Upgrade warning: in prior version 1.13 this extended
IdTokenResponse, but starting with version 1.14
it now extends TokenResponse.
com.google.api.client.util.GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
GoogleTokenResponse() |
| Modifier and Type | Method and Description |
|---|---|
GoogleTokenResponse |
clone() |
String |
getIdToken()
Returns the ID token.
|
GoogleIdToken |
parseIdToken()
|
GoogleTokenResponse |
set(String fieldName,
Object value) |
GoogleTokenResponse |
setAccessToken(String accessToken) |
GoogleTokenResponse |
setExpiresInSeconds(Long expiresIn) |
GoogleTokenResponse |
setIdToken(String idToken)
Sets the ID token.
|
GoogleTokenResponse |
setRefreshToken(String refreshToken) |
GoogleTokenResponse |
setScope(String scope) |
GoogleTokenResponse |
setTokenType(String tokenType) |
boolean |
verifyIdToken(GoogleIdTokenVerifier verifier)
Deprecated.
(scheduled to be removed in 1.15) Use
GoogleIdTokenVerifier.verify(GoogleIdToken) with parseIdToken() |
getAccessToken, getExpiresInSeconds, getRefreshToken, getScope, getTokenTypegetFactory, setFactory, toPrettyString, toStringentrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, valuespublic GoogleTokenResponse setAccessToken(String accessToken)
setAccessToken in class com.google.api.client.auth.oauth2.TokenResponsepublic GoogleTokenResponse setTokenType(String tokenType)
setTokenType in class com.google.api.client.auth.oauth2.TokenResponsepublic GoogleTokenResponse setExpiresInSeconds(Long expiresIn)
setExpiresInSeconds in class com.google.api.client.auth.oauth2.TokenResponsepublic GoogleTokenResponse setRefreshToken(String refreshToken)
setRefreshToken in class com.google.api.client.auth.oauth2.TokenResponsepublic GoogleTokenResponse setScope(String scope)
setScope in class com.google.api.client.auth.oauth2.TokenResponsepublic final String getIdToken()
public GoogleTokenResponse setIdToken(String idToken)
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Upgrade warning: in prior version 1.13 null was allowed, but starting with version 1.14
null is not allowed.
public GoogleIdToken parseIdToken() throws IOException
IOException@Deprecated public boolean verifyIdToken(GoogleIdTokenVerifier verifier) throws GeneralSecurityException, IOException
GoogleIdTokenVerifier.verify(GoogleIdToken) with parseIdToken()GoogleIdTokenVerifier.verify(com.google.api.client.googleapis.auth.oauth2.GoogleIdToken) by passing it
parseIdToken().verifier - Google ID token verifierGeneralSecurityExceptionIOExceptionpublic GoogleTokenResponse set(String fieldName, Object value)
set in class com.google.api.client.auth.oauth2.TokenResponsepublic GoogleTokenResponse clone()
clone in class com.google.api.client.auth.oauth2.TokenResponseCopyright © 2010-2013 Google. All Rights Reserved.