Send feedback
Class StoredCredential (1.34.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version 1.34.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
Static Fields
DEFAULT_DATA_STORE_ID
public static final String DEFAULT_DATA_STORE_ID
Field Value
Type
Description
String
Static Methods
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
Constructors
StoredCredential()
public StoredCredential ()
StoredCredential(Credential credential)
public StoredCredential ( Credential credential )
Parameter
Name
Description
credential
Credential
existing credential to copy from
Methods
equals(Object other)
public boolean equals ( Object other )
Parameter
Name
Description
other
Object
Overrides
getAccessToken()
public String getAccessToken ()
Returns the access token or null
for none.
Returns
Type
Description
String
getExpirationTimeMilliseconds()
public Long getExpirationTimeMilliseconds ()
Returns the expected expiration time in milliseconds or null
for none.
Returns
Type
Description
Long
getRefreshToken()
public String getRefreshToken ()
Returns the refresh token or null
for none.
Returns
Type
Description
String
hashCode()
Returns
Type
Description
int
Overrides
setAccessToken(String accessToken)
public StoredCredential setAccessToken ( String accessToken )
Sets the access token or null
for none.
Parameter
Name
Description
accessToken
String
setExpirationTimeMilliseconds(Long expirationTimeMilliseconds)
public StoredCredential setExpirationTimeMilliseconds ( Long expirationTimeMilliseconds )
Sets the expected expiration time in milliseconds or null
for none.
Parameter
Name
Description
expirationTimeMilliseconds
Long
setRefreshToken(String refreshToken)
public StoredCredential setRefreshToken ( String refreshToken )
Sets the refresh token or null
for none.
Parameter
Name
Description
refreshToken
String
toString()
Returns
Type
Description
String
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-12-19 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-12-19 UTC."],[],[]]