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.
com.google.api.client.util.GenericData.Flags
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
GoogleTokenResponse() |
Modifier and Type | Method and Description |
---|---|
GoogleTokenResponse |
clone() |
String |
getIdToken()
Beta Returns the ID token. |
GoogleIdToken |
parseIdToken()
|
GoogleTokenResponse |
set(String fieldName,
Object value) |
GoogleTokenResponse |
setAccessToken(String accessToken) |
GoogleTokenResponse |
setExpiresInSeconds(Long expiresIn) |
GoogleTokenResponse |
setIdToken(String idToken)
Beta Sets the ID token. |
GoogleTokenResponse |
setRefreshToken(String refreshToken) |
GoogleTokenResponse |
setScope(String scope) |
GoogleTokenResponse |
setTokenType(String tokenType) |
getAccessToken, getExpiresInSeconds, getRefreshToken, getScope, getTokenType
getFactory, setFactory, toPrettyString, toString
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, isEmpty, keySet, size, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public GoogleTokenResponse setAccessToken(String accessToken)
setAccessToken
in class com.google.api.client.auth.oauth2.TokenResponse
public GoogleTokenResponse setTokenType(String tokenType)
setTokenType
in class com.google.api.client.auth.oauth2.TokenResponse
public GoogleTokenResponse setExpiresInSeconds(Long expiresIn)
setExpiresInSeconds
in class com.google.api.client.auth.oauth2.TokenResponse
public GoogleTokenResponse setRefreshToken(String refreshToken)
setRefreshToken
in class com.google.api.client.auth.oauth2.TokenResponse
public GoogleTokenResponse setScope(String scope)
setScope
in class com.google.api.client.auth.oauth2.TokenResponse
@Beta public final String getIdToken()
Beta
@Beta public GoogleTokenResponse setIdToken(String idToken)
Beta
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
@Beta public GoogleIdToken parseIdToken() throws IOException
IOException
public GoogleTokenResponse set(String fieldName, Object value)
set
in class com.google.api.client.auth.oauth2.TokenResponse
public GoogleTokenResponse clone()
clone
in class com.google.api.client.auth.oauth2.TokenResponse
Copyright © 2010–2019 Google. All rights reserved.