FileDataStoreFactory with
StoredCredential instead, optionally using
migrateTo(FileDataStoreFactory) or migrateTo(DataStore) to
migrating an existing FileCredentialStore.@Deprecated @Beta public class FileCredentialStore extends Object implements CredentialStore
Beta | Constructor and Description |
|---|
FileCredentialStore(File file,
JsonFactory jsonFactory)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String userId,
Credential credential)
Deprecated.
|
protected boolean |
isSymbolicLink(File file)
Deprecated.
Returns whether the given file is a symbolic link.
|
boolean |
load(String userId,
Credential credential)
Deprecated.
|
void |
migrateTo(DataStore<StoredCredential> credentialDataStore)
Deprecated.
Migrates to the new format using
DataStore of StoredCredential. |
void |
migrateTo(FileDataStoreFactory dataStoreFactory)
Deprecated.
Migrates to the new
FileDataStoreFactory format. |
void |
store(String userId,
Credential credential)
Deprecated.
|
public FileCredentialStore(File file, JsonFactory jsonFactory) throws IOException
file - File to store user credentialsjsonFactory - JSON factory to serialize user credentialsIOExceptionprotected boolean isSymbolicLink(File file) throws IOException
IOExceptionpublic void store(String userId, Credential credential) throws IOException
store in interface CredentialStoreIOExceptionpublic void delete(String userId, Credential credential) throws IOException
delete in interface CredentialStoreIOExceptionpublic boolean load(String userId, Credential credential)
load in interface CredentialStorepublic final void migrateTo(FileDataStoreFactory dataStoreFactory) throws IOException
FileDataStoreFactory format.
Sample usage:
public static FileDataStore migrate(FileCredentialStore credentialStore, File dataDirectory)
throws IOException {
FileDataStore dataStore = new FileDataStore(dataDirectory);
credentialStore.migrateTo(dataStore);
return dataStore;
}
dataStoreFactory - file data store factoryIOExceptionpublic final void migrateTo(DataStore<StoredCredential> credentialDataStore) throws IOException
DataStore of StoredCredential.credentialDataStore - credential data storeIOExceptionCopyright © 2011–2020 Google. All rights reserved.