AppEngineDataStoreFactory
with
StoredCredential
instead,
optionally using migrateTo(AppEngineDataStoreFactory)
or
migrateTo(DataStore)
to migrating an existing
AppEngineCredentialStore
.@Deprecated @Beta public class AppEngineCredentialStore extends Object implements CredentialStore
Beta
Constructor and Description |
---|
AppEngineCredentialStore()
Deprecated.
|
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 |
migrateTo(AppEngineDataStoreFactory dataStoreFactory)
Deprecated.
Migrates to the new
AppEngineDataStoreFactory format. |
void |
migrateTo(DataStore<StoredCredential> credentialDataStore)
Deprecated.
Migrates to the new format using
DataStore of StoredCredential . |
void |
store(String userId,
Credential credential)
Deprecated.
Stores the credential of the given user ID.
|
public void store(String userId, Credential credential)
CredentialStore
store
in interface CredentialStore
userId
- user ID whose credential needs to be storedcredential
- credential whose access token
,
refresh token
, and
expiration time
need to be storedpublic void delete(String userId, Credential credential)
CredentialStore
delete
in interface CredentialStore
userId
- user ID whose credential needs to be deletedcredential
- credential to be deletedpublic boolean load(String userId, Credential credential)
CredentialStore
load
in interface CredentialStore
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
otherwisepublic final void migrateTo(AppEngineDataStoreFactory dataStoreFactory) throws IOException
AppEngineDataStoreFactory
format.
Sample usage:
public static AppEngineDataStore migrate(AppEngineCredentialStore credentialStore) throws IOException { AppEngineDataStore dataStore = new AppEngineDataStore(); credentialStore.migrateTo(dataStore); return dataStore; }
dataStoreFactory
- App Engine data store factoryIOException
public final void migrateTo(DataStore<StoredCredential> credentialDataStore) throws IOException
DataStore
of StoredCredential
.credentialDataStore
- credential data storeIOException
Copyright © 2011–2020 Google. All rights reserved.