Google APIs Client Library for C++
|
A concrete CredentialStore that writes to files. More...
#include "client/auth/file_credential_store.h"
Public Member Functions | |
FileCredentialStoreFactory (const StringPiece &root_path) | |
Standard constructor. | |
~FileCredentialStoreFactory () | |
Standard destructor. | |
const string & | root_path () const |
Returns the root path the store was constructed with. | |
virtual CredentialStore * | NewCredentialStore (const string &client_id, util::Status *status) const |
Creates a new store for the given client id. | |
Static Public Member Functions | |
static util::Status | GetSystemHomeDirectoryStorePath (string *path) |
Returns the path in the $HOME directory for the googleapis store. |
A concrete CredentialStore that writes to files.
Stores credentials as individual files using the user_name name. The root_path is the root directory of the store. It must be user-read/writable only. If the path does not exist, then it will be created with user-only read/write/examine permissions.
FileCredentialStoreFactory | ( | const StringPiece & | root_path | ) | [explicit] |
Standard constructor.
[in] | root_path | It is expected, but not required, that root_path is the result of GetSystemHomeDirectoryStorePath(). |
Standard destructor.
static util::Status GetSystemHomeDirectoryStorePath | ( | string * | path | ) | [static] |
Returns the path in the $HOME directory for the googleapis store.
This user is the local OS user, not the googleapis cloud user. The cloud user data will be stored within this local OS user.
[out] | path | The home directory path for storing credentials. |
virtual CredentialStore* NewCredentialStore | ( | const string & | client_id, |
util::Status * | status | ||
) | const [virtual] |
Creates a new store for the given client id.
[in] | client_id | The client this store is for is used as the filename. |
[out] | status | Set witth the reason for failure if NULL is returned. |
Implements CredentialStoreFactory.
const string& root_path | ( | ) | const [inline] |
Returns the root path the store was constructed with.