public class GoogleTokenResponse extends 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.
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 TokenResponse
public GoogleTokenResponse setTokenType(String tokenType)
setTokenType
in class TokenResponse
public GoogleTokenResponse setExpiresInSeconds(Long expiresIn)
setExpiresInSeconds
in class TokenResponse
public GoogleTokenResponse setRefreshToken(String refreshToken)
setRefreshToken
in class TokenResponse
public GoogleTokenResponse setScope(String scope)
setScope
in class TokenResponse
@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 TokenResponse
public GoogleTokenResponse clone()
clone
in class TokenResponse
Copyright © 2010–2021 Google. All rights reserved.