| Top | Description | Object Hierarchy | Properties |
GSignondSecretStorageGSignondSecretStorage — provides access to the database that stores user credentials and identity/method cache |
#include <gsignond/gsignond-secret-storage.h>
GSignondSecretStorage;
GSignondSecretStorageClass;
gboolean gsignond_secret_storage_check_credentials
(GSignondSecretStorage *self,
GSignondCredentials *creds);
gboolean gsignond_secret_storage_clear_db (GSignondSecretStorage *self);
gboolean gsignond_secret_storage_close_db (GSignondSecretStorage *self);
const GError * gsignond_secret_storage_get_last_error
(GSignondSecretStorage *self);
gboolean gsignond_secret_storage_is_open_db (GSignondSecretStorage *self);
GSignondCredentials * gsignond_secret_storage_load_credentials
(GSignondSecretStorage *self,
const guint32 id);
GHashTable * gsignond_secret_storage_load_data (GSignondSecretStorage *self,
const guint32 id,
const guint32 method);
gboolean gsignond_secret_storage_open_db (GSignondSecretStorage *self);
gboolean gsignond_secret_storage_remove_credentials
(GSignondSecretStorage *self,
const guint32 id);
gboolean gsignond_secret_storage_remove_data (GSignondSecretStorage *self,
const guint32 id,
const guint32 method);
gboolean gsignond_secret_storage_update_credentials
(GSignondSecretStorage *self,
GSignondCredentials *creds);
gboolean gsignond_secret_storage_update_data (GSignondSecretStorage *self,
const guint32 id,
const guint32 method,
GHashTable *data);
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.
typedef struct _GSignondSecretStorage GSignondSecretStorage;
Opaque GSignondSecretStorage data structure.
typedef struct {
GObjectClass parent_class;
gboolean
(*open_db) (GSignondSecretStorage *self);
gboolean
(*close_db) (GSignondSecretStorage *self);
gboolean
(*clear_db) (GSignondSecretStorage *self);
gboolean
(*is_open_db) (GSignondSecretStorage *self);
GSignondCredentials*
(*load_credentials) (
GSignondSecretStorage *self,
const guint32 id);
gboolean
(*update_credentials) (
GSignondSecretStorage *self,
GSignondCredentials* creds);
gboolean
(*remove_credentials) (
GSignondSecretStorage *self,
const guint32 id);
gboolean
(*check_credentials) (
GSignondSecretStorage *self,
GSignondCredentials* creds);
GSignondDictionary*
(*load_data) (
GSignondSecretStorage *self,
const guint32 id,
const guint32 method);
gboolean
(*update_data) (
GSignondSecretStorage *self,
const guint32 id,
const guint32 method,
GSignondDictionary *data);
gboolean
(*remove_data) (
GSignondSecretStorage *self,
const guint32 id,
const guint32 method);
const GError*
(*get_last_error) (GSignondSecretStorage *self);
} GSignondSecretStorageClass;
GSignondSecretStorageClass class containing pointers to class methods.
GObjectClass |
parent class. |
an implementation of gsignond_secret_storage_open_db()
|
|
an implementation of gsignond_secret_storage_close_db()
|
|
an implementation of gsignond_secret_storage_clear_db()
|
|
an implementation of gsignond_secret_storage_is_open_db()
|
|
an implementation of gsignond_secret_storage_load_credentials()
|
|
an implementation of gsignond_secret_storage_update_credentials()
|
|
an implementation of gsignond_secret_storage_remove_credentials()
|
|
an implementation of gsignond_secret_storage_check_credentials()
|
|
an implementation of gsignond_secret_storage_load_data()
|
|
an implementation of gsignond_secret_storage_update_data()
|
|
an implementation of gsignond_secret_storage_remove_data()
|
|
an implementation of gsignond_secret_storage_get_last_error()
|
gboolean gsignond_secret_storage_check_credentials (GSignondSecretStorage *self,GSignondCredentials *creds);
Checks whether the given credentials match what is stored in the database.
|
instance of GSignondSecretStorage |
|
the credentials that are being checked. [transfer none] |
Returns : |
TRUE if successful, FALSE otherwise. |
gboolean gsignond_secret_storage_clear_db (GSignondSecretStorage *self);
Removes all stored secrets from the database.
|
instance of GSignondSecretStorage |
Returns : |
TRUE if successful, FALSE otherwise. |
gboolean gsignond_secret_storage_close_db (GSignondSecretStorage *self);
Closes the database. To reopen it, call gsignond_secret_storage_open_db().
|
instance of GSignondSecretStorage |
Returns : |
TRUE if successful, FALSE otherwise. |
const GError * gsignond_secret_storage_get_last_error
(GSignondSecretStorage *self);
Retrieves the last occurred error that has occured
|
instance of GSignondSecretStorage |
Returns : |
last occurred GError. [transfer none] |
gboolean gsignond_secret_storage_is_open_db (GSignondSecretStorage *self);
Checks if the database is open or not.
|
instance of GSignondSecretStorage |
Returns : |
TRUE if successful, FALSE otherwise. |
GSignondCredentials * gsignond_secret_storage_load_credentials (GSignondSecretStorage *self,const guint32 id);
Loads the credentials from the database.
|
instance of GSignondSecretStorage |
|
the identity id whose credentials are being loaded. |
Returns : |
GSignondCredentials if successful, NULL otherwise. [transfer full] |
GHashTable * gsignond_secret_storage_load_data (GSignondSecretStorage *self,const guint32 id,const guint32 method);
Loads the secret data associated with a given identity and method.
|
instance of GSignondSecretStorage |
|
the identity id whose data are fetched |
|
the authentication method the data is used for. |
Returns : |
the secret data. [transfer full] |
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 and GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME to determine database location in the filesystem.
The default implementation is using SQLite for the storage.
|
instance of GSignondSecretStorage |
Returns : |
TRUE if successful, FALSE otherwise. |
gboolean gsignond_secret_storage_remove_credentials (GSignondSecretStorage *self,const guint32 id);
Remove the credentials for the given identity.
|
instance of GSignondSecretStorage |
|
the identity whose credentials are being updated. |
Returns : |
TRUE if successful, FALSE otherwise. |
gboolean gsignond_secret_storage_remove_data (GSignondSecretStorage *self,const guint32 id,const guint32 method);
Removes secret data associated with a given id/method.
|
instance of GSignondSecretStorage |
|
the identity whose data are fetched. |
|
the authentication method the data is used for. |
Returns : |
TRUE if successful, FALSE otherwise. |
gboolean gsignond_secret_storage_update_credentials (GSignondSecretStorage *self,GSignondCredentials *creds);
Stores/updates the credentials for the given identity.
|
instance of GSignondSecretStorage |
|
the credentials that are being updated. [transfer none] |
Returns : |
TRUE if successful, FALSE otherwise. |
gboolean gsignond_secret_storage_update_data (GSignondSecretStorage *self,const guint32 id,const guint32 method,GHashTable *data);
Calling this method updates the secret data associated with the given id/method.
|
instance of GSignondSecretStorage |
|
the identity whose data are fetched. |
|
the authentication method the data is used for. |
|
the data to update. [transfer none] |
Returns : |
TRUE if successful, FALSE otherwise. |
"config" property"config" GSignondConfig* : Read / Write / Construct Only
Configuration object.