Class StoredCredential
java.lang.Object
com.google.api.client.auth.oauth2.StoredCredential
- All Implemented Interfaces:
Serializable
Beta Credential information to be stored in a
DataStoreFactory.
Implementation is thread safe.
- Since:
- 1.16
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringAccess token ornullfor none.static final StringDefault data store ID.private LongExpected expiration time in milliseconds ornullfor none.private final LockLock on access to the store.private StringRefresh token ornullfor none.private static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the access token ornullfor none.static com.google.api.client.util.store.DataStore<StoredCredential> getDefaultDataStore(com.google.api.client.util.store.DataStoreFactory dataStoreFactory) Returns the stored credential data store using the IDDEFAULT_DATA_STORE_ID.Returns the expected expiration time in milliseconds ornullfor none.Returns the refresh token ornullfor none.inthashCode()setAccessToken(String accessToken) Sets the access token ornullfor none.setExpirationTimeMilliseconds(Long expirationTimeMilliseconds) Sets the expected expiration time in milliseconds ornullfor none.setRefreshToken(String refreshToken) Sets the refresh token ornullfor none.toString()
-
Field Details
-
DEFAULT_DATA_STORE_ID
Default data store ID. -
serialVersionUID
private static final long serialVersionUID- See Also:
-
lock
Lock on access to the store. -
accessToken
Access token ornullfor none. -
expirationTimeMilliseconds
Expected expiration time in milliseconds ornullfor none. -
refreshToken
Refresh token ornullfor none.
-
-
Constructor Details
-
StoredCredential
public StoredCredential() -
StoredCredential
- Parameters:
credential- existing credential to copy from
-
-
Method Details
-
getAccessToken
Returns the access token ornullfor none. -
setAccessToken
Sets the access token ornullfor none. -
getExpirationTimeMilliseconds
Returns the expected expiration time in milliseconds ornullfor none. -
setExpirationTimeMilliseconds
Sets the expected expiration time in milliseconds ornullfor none. -
getRefreshToken
Returns the refresh token ornullfor none. -
setRefreshToken
Sets the refresh token ornullfor none. -
toString
-
equals
-
hashCode
public int hashCode() -
getDefaultDataStore
public static com.google.api.client.util.store.DataStore<StoredCredential> getDefaultDataStore(com.google.api.client.util.store.DataStoreFactory dataStoreFactory) throws IOException Returns the stored credential data store using the IDDEFAULT_DATA_STORE_ID.- Parameters:
dataStoreFactory- data store factory- Returns:
- stored credential data store
- Throws:
IOException
-