Class StoredCredential (1.32.1)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 1.32.1keyboard_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
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 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,[]]