Top |
GSignondSecretStorageGSignondSecretStorage — provides access to the database that stores user credentials and identity/method cache |
gboolean | gsignond_secret_storage_open_db () |
gboolean | gsignond_secret_storage_close_db () |
gboolean | gsignond_secret_storage_clear_db () |
gboolean | gsignond_secret_storage_is_open_db () |
GSignondCredentials * | gsignond_secret_storage_load_credentials () |
gboolean | gsignond_secret_storage_update_credentials () |
gboolean | gsignond_secret_storage_remove_credentials () |
gboolean | gsignond_secret_storage_check_credentials () |
GSignondDictionary * | gsignond_secret_storage_load_data () |
gboolean | gsignond_secret_storage_update_data () |
gboolean | gsignond_secret_storage_remove_data () |
const GError * | gsignond_secret_storage_get_last_error () |
GSignondSecretStorage provides access to the database where sensitive identity data (GSignondCredentials) and identity/method cache are stored. It's preferred that this database is protected against access by processes other than gSSO.
gSSO can be configured to use a custom extension that provides a subclassed implementation of GSignondSecretStorage (see GSignondExtension), otherwise a default implementation is used.
gboolean
gsignond_secret_storage_open_db (GSignondSecretStorage *self
);
Opens (and initializes) the database. The implementation should take care of creating the DB, if it doesn't exist, and it should use GSIGNOND_CONFIG_GENERAL_SECURE_DIR to determine database location in the filesystem.
The default implementation is using SQLite for the storage.
gboolean
gsignond_secret_storage_close_db (GSignondSecretStorage *self
);
Closes the database. To reopen it, call gsignond_secret_storage_open_db()
.
gboolean
gsignond_secret_storage_clear_db (GSignondSecretStorage *self
);
Removes all stored secrets from the database.
gboolean
gsignond_secret_storage_is_open_db (GSignondSecretStorage *self
);
Checks if the database is open or not.
GSignondCredentials * gsignond_secret_storage_load_credentials (GSignondSecretStorage *self
,const guint32 id
);
Loads the credentials from the database.
gboolean gsignond_secret_storage_update_credentials (GSignondSecretStorage *self
,GSignondCredentials *creds
);
Stores/updates the credentials for the given identity.
gboolean gsignond_secret_storage_remove_credentials (GSignondSecretStorage *self
,const guint32 id
);
Remove the credentials for the given identity.
gboolean gsignond_secret_storage_check_credentials (GSignondSecretStorage *self
,GSignondCredentials *creds
);
Checks whether the given credentials match what is stored in the database.
GSignondDictionary * gsignond_secret_storage_load_data (GSignondSecretStorage *self
,const guint32 id
,const guint32 method
);
Loads the secret data associated with a given identity and method.
gboolean gsignond_secret_storage_update_data (GSignondSecretStorage *self
,const guint32 id
,const guint32 method
,GSignondDictionary *data
);
Calling this method updates the secret data associated with the given id/method.
gboolean gsignond_secret_storage_remove_data (GSignondSecretStorage *self
,const guint32 id
,const guint32 method
);
Removes secret data associated with a given id/method.