Send feedback
Class StoredCredential (1.32.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version 1.32.1 keyboard_arrow_down
public final class StoredCredential implements Serializable
Beta
Credential information to be stored in a DataStoreFactory .
Implementation is thread safe.
Inheritance
Object >
StoredCredential
Constructors
StoredCredential()
public StoredCredential()
StoredCredential(Credential credential)
public StoredCredential(Credential credential)
Parameter
Name Description credential Credential
existing credential to copy from
Fields
DEFAULT_DATA_STORE_ID
public static final String DEFAULT_DATA_STORE_ID
Field Value
Methods
equals(Object other)
public boolean equals(Object other)
Parameter
Returns
Overrides
getAccessToken()
public String getAccessToken()
Returns the access token or null
for none.
Returns
getDefaultDataStore(DataStoreFactory dataStoreFactory)
public static DataStore<StoredCredential> getDefaultDataStore(DataStoreFactory dataStoreFactory)
Parameter
Name Description dataStoreFactory com.google.api.client.util.store.DataStoreFactory
data store factory
Returns
Type Description com.google.api.client.util.store.DataStore <StoredCredential >stored credential data store
Exceptions
getExpirationTimeMilliseconds()
public Long getExpirationTimeMilliseconds()
Returns the expected expiration time in milliseconds or null
for none.
Returns
getRefreshToken()
public String getRefreshToken()
Returns the refresh token or null
for none.
Returns
hashCode()
Returns
Overrides
setAccessToken(String accessToken)
public StoredCredential setAccessToken(String accessToken)
Sets the access token or null
for none.
Parameter
Name Description accessToken String
Returns
setExpirationTimeMilliseconds(Long expirationTimeMilliseconds)
public StoredCredential setExpirationTimeMilliseconds(Long expirationTimeMilliseconds)
Sets the expected expiration time in milliseconds or null
for none.
Parameter
Name Description expirationTimeMilliseconds Long
Returns
setRefreshToken(String refreshToken)
public StoredCredential setRefreshToken(String refreshToken)
Sets the refresh token or null
for none.
Parameter
Name Description refreshToken String
Returns
toString()
Returns
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-30 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-30 UTC."],[],[]]