public class TokenResponse extends GenericJson
Implementation is not thread-safe.
GenericData.Flags
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
TokenResponse() |
Modifier and Type | Method and Description |
---|---|
TokenResponse |
clone() |
String |
getAccessToken()
Returns the access token issued by the authorization server.
|
Long |
getExpiresInSeconds()
Returns the lifetime in seconds of the access token (for example 3600 for an hour) or
null for none. |
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 or
null for none. |
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 in seconds of the access token (for example 3600 for an hour) or
null
for none. |
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, 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 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.
public 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.
public Long getExpiresInSeconds()
null
for none.public TokenResponse setExpiresInSeconds(Long expiresInSeconds)
null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public 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.
public 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.
public TokenResponse set(String fieldName, Object value)
set
in class GenericJson
public TokenResponse clone()
clone
in class GenericJson
Copyright © 2011–2020 Google. All rights reserved.