@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.Flags
AbstractMap.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, 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 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)
TokenResponse
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setAccessToken
in class TokenResponse
public IdTokenResponse setTokenType(String tokenType)
TokenResponse
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setTokenType
in class TokenResponse
public IdTokenResponse setExpiresInSeconds(Long expiresIn)
TokenResponse
null
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 TokenResponse
public IdTokenResponse setRefreshToken(String refreshToken)
TokenResponse
null
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 TokenResponse
public IdTokenResponse setScope(String scope)
TokenResponse
null
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 TokenResponse
public IdToken parseIdToken() throws IOException
IOException
public static IdTokenResponse execute(TokenRequest tokenRequest) throws IOException
tokenRequest
- token requestTokenResponseException
- for an error responseIOException
public IdTokenResponse set(String fieldName, Object value)
set
in class TokenResponse
public IdTokenResponse clone()
clone
in class TokenResponse
Copyright © 2011–2019 Google. All rights reserved.