Interface CredentialStore
- All Known Implementing Classes:
FileCredentialStore
Deprecated.
Beta OAuth 2.0 credential persistence store interface to provide a fully pluggable storage mechanism.
The user ID should be used as the primary key for storage, and the rest of the data consists of
the access token, refresh
token, and expiration time.
Implementations should be thread safe.
- Since:
- 1.7
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(String userId, Credential credential) Deprecated.Deletes the credential of the given user ID.booleanload(String userId, Credential credential) Deprecated.Loads the credential for the given user ID.voidstore(String userId, Credential credential) Deprecated.Stores the credential of the given user ID.
-
Method Details
-
load
Deprecated.Loads the credential for the given user ID.- Parameters:
userId- user ID whose credential needs to be loadedcredential- credential whoseaccess token,refresh token, andexpiration timeneed to be set if the credential already exists in storage- Returns:
trueif the credential has been successfully found and loaded orfalseotherwise- Throws:
IOException
-
store
Deprecated.Stores the credential of the given user ID.- Parameters:
userId- user ID whose credential needs to be storedcredential- credential whoseaccess token,refresh token, andexpiration timeneed to be stored- Throws:
IOException
-
delete
Deprecated.Deletes the credential of the given user ID.- Parameters:
userId- user ID whose credential needs to be deletedcredential- credential to be deleted- Throws:
IOException
-
DataStoreFactorywithStoredCredentialinstead.