@Beta public class IdTokenResponse extends TokenResponse
Beta Implementation is not thread-safe. Sample usage:
static JsonWebSignature executeIdToken(TokenRequest tokenRequest) throws IOException {
IdTokenResponse idTokenResponse = IdTokenResponse.execute(tokenRequest);
return idTokenResponse.parseIdToken();
}
GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
IdTokenResponse() |
| Modifier and Type | Method and Description |
|---|---|
IdTokenResponse |
clone() |
static IdTokenResponse |
execute(TokenRequest tokenRequest)
Executes the given ID token request, and returns the parsed ID token response.
|
String |
getIdToken()
Returns the ID token.
|
IdToken |
parseIdToken()
|
IdTokenResponse |
set(String fieldName,
Object value) |
IdTokenResponse |
setAccessToken(String accessToken)
Sets the access token issued by the authorization server.
|
IdTokenResponse |
setExpiresInSeconds(Long expiresIn)
Sets the lifetime in seconds of the access token (for example 3600 for an hour) or
null
for none. |
IdTokenResponse |
setIdToken(String idToken)
Sets the ID token.
|
IdTokenResponse |
setRefreshToken(String refreshToken)
Sets the refresh token which can be used to obtain new access tokens using the same
authorization grant or
null for none. |
IdTokenResponse |
setScope(String scope)
Sets the scope of the access token or
null for none. |
IdTokenResponse |
setTokenType(String tokenType)
Sets the token type (as specified in Access Token Types).
|
getAccessToken, getExpiresInSeconds, getRefreshToken, getScope, getTokenTypegetFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic final String getIdToken()
public IdTokenResponse setIdToken(String idToken)
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public IdTokenResponse setAccessToken(String accessToken)
TokenResponseOverriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setAccessToken in class TokenResponsepublic IdTokenResponse setTokenType(String tokenType)
TokenResponseOverriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setTokenType in class TokenResponsepublic IdTokenResponse setExpiresInSeconds(Long expiresIn)
TokenResponsenull
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setExpiresInSeconds in class TokenResponsepublic IdTokenResponse setRefreshToken(String refreshToken)
TokenResponsenull for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setRefreshToken in class TokenResponsepublic IdTokenResponse setScope(String scope)
TokenResponsenull for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setScope in class TokenResponsepublic IdToken parseIdToken() throws IOException
IOExceptionpublic static IdTokenResponse execute(TokenRequest tokenRequest) throws IOException
tokenRequest - token requestTokenResponseException - for an error responseIOExceptionpublic IdTokenResponse set(String fieldName, Object value)
set in class TokenResponsepublic IdTokenResponse clone()
clone in class TokenResponseCopyright © 2011–2021 Google. All rights reserved.