public class MemoryCredentialStore extends Object implements CredentialStore
| Constructor and Description |
|---|
MemoryCredentialStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String userId,
Credential credential)
Deletes the credential of the given user ID.
|
boolean |
load(String userId,
Credential credential)
Loads the credential for the given user ID.
|
void |
store(String userId,
Credential credential)
Stores the credential of the given user ID.
|
public void store(String userId, Credential credential)
CredentialStorestore in interface CredentialStoreuserId - 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)
CredentialStoredelete in interface CredentialStoreuserId - user ID whose credential needs to be deletedcredential - credential to be deletedpublic boolean load(String userId, Credential credential)
CredentialStoreload in interface CredentialStoreuserId - 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
otherwiseCopyright © 2011-2013 Google. All Rights Reserved.