DataStoreFactory
with
StoredCredential
instead.@Deprecated @Beta public interface CredentialStore
Beta
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.
Modifier and Type | Method and Description |
---|---|
void |
delete(String userId,
Credential credential)
Deprecated.
Deletes the credential of the given user ID.
|
boolean |
load(String userId,
Credential credential)
Deprecated.
Loads the credential for the given user ID.
|
void |
store(String userId,
Credential credential)
Deprecated.
Stores the credential of the given user ID.
|
boolean load(String userId, Credential credential) throws IOException
userId
- user ID whose credential needs to be loadedcredential
- credential whose access token
,
refresh token
, and
expiration time
need to be set if the
credential already exists in storagetrue
if the credential has been successfully found and loaded or false
otherwiseIOException
void store(String userId, Credential credential) throws IOException
userId
- user ID whose credential needs to be storedcredential
- credential whose access token
,
refresh token
, and
expiration time
need to be storedIOException
void delete(String userId, Credential credential) throws IOException
userId
- user ID whose credential needs to be deletedcredential
- credential to be deletedIOException
Copyright © 2011–2019 Google. All rights reserved.