public class TokenResponse
extends com.google.api.client.json.GenericJson
Implementation is not thread-safe.
com.google.api.client.util.GenericData.Flags
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
TokenResponse() |
Modifier and Type | Method and Description |
---|---|
TokenResponse |
clone() |
String |
getAccessToken()
Gets the access token issued by the authorization server.
|
Long |
getExpiresInSeconds()
Returns the lifetime of the access token.
|
String |
getRefreshToken()
Returns the refresh token which can be used to obtain new access tokens using the same
authorization grant or
null for none. |
String |
getScope()
Returns the scope of the access token
|
String |
getTokenType()
Returns the token type (as specified in Access Token Types).
|
TokenResponse |
set(String fieldName,
Object value) |
TokenResponse |
setAccessToken(String accessToken)
Sets the access token issued by the authorization server.
|
TokenResponse |
setExpiresInSeconds(Long expiresInSeconds)
Sets the lifetime of the access token
|
TokenResponse |
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. |
TokenResponse |
setScope(String scope)
Sets the scope of the access token or
null for none. |
TokenResponse |
setTokenType(String tokenType)
Sets the token type (as specified in Access Token Types).
|
getFactory, setFactory, toPrettyString, toString
entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, equals, hashCode, 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 getAccessToken()
public TokenResponse setAccessToken(String accessToken)
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
accessToken
- The access tokenpublic final String getTokenType()
public TokenResponse setTokenType(String tokenType)
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
tokenType
- The token typepublic final Long getExpiresInSeconds()
null
for nonepublic TokenResponse setExpiresInSeconds(Long expiresInSeconds)
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
expiresInSeconds
- the lifetime in seconds(for example 3600 for an hour) or null
for none.public final String getRefreshToken()
null
for none.public TokenResponse setRefreshToken(String refreshToken)
null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
refreshToken
- the refresh tokenpublic final String getScope()
null
for none.public TokenResponse setScope(String scope)
null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
scope
- the scope (eg, openid, profile etc)public TokenResponse set(String fieldName, Object value)
set
in class com.google.api.client.json.GenericJson
public TokenResponse clone()
clone
in class com.google.api.client.json.GenericJson
Copyright © 2016–2019. All rights reserved.