Top | ![]() |
![]() |
![]() |
![]() |
GSignondSecretStorageGSignondSecretStorage — provides access to the database that stores user credentials and identity/method cache |
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.
self |
instance of GSignondSecretStorage |
|
id |
the identity id whose credentials are being loaded. |
gboolean gsignond_secret_storage_update_credentials (GSignondSecretStorage *self
,GSignondCredentials *creds
);
Stores/updates the credentials for the given identity.
self |
instance of GSignondSecretStorage |
|
creds |
the credentials that are being updated. |
[transfer none] |
gboolean gsignond_secret_storage_remove_credentials (GSignondSecretStorage *self
,const guint32 id
);
Remove the credentials for the given identity.
self |
instance of GSignondSecretStorage |
|
id |
the identity whose credentials are being updated. |
gboolean gsignond_secret_storage_check_credentials (GSignondSecretStorage *self
,GSignondCredentials *creds
);
Checks whether the given credentials match what is stored in the database.
self |
instance of GSignondSecretStorage |
|
creds |
the credentials that are being checked. |
[transfer none] |
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.
self |
instance of GSignondSecretStorage |
|
id |
the identity id whose data are fetched |
|
method |
the authentication method the data is used for. |
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.
self |
instance of GSignondSecretStorage |
|
id |
the identity whose data are fetched. |
|
method |
the authentication method the data is used for. |
|
data |
the data to update. |
[transfer none] |
gboolean gsignond_secret_storage_remove_data (GSignondSecretStorage *self
,const guint32 id
,const guint32 method
);
Removes secret data associated with a given id/method.
self |
instance of GSignondSecretStorage |
|
id |
the identity whose data are fetched. |
|
method |
the authentication method the data is used for. |
const GError *
gsignond_secret_storage_get_last_error
(GSignondSecretStorage *self
);
Retrieves the last occurred error that has occured
“config”
property“config” GSignondConfig *
Configuration object.
Flags: Read / Write / Construct Only