Top |
Description
The e-secret-store API provides an interface to store, lookup and delete secrets from the keyring.
Functions
e_secret_store_store_sync ()
gboolean e_secret_store_store_sync (const gchar *uid
,const gchar *secret
,const gchar *label
,gboolean permanently
,GCancellable *cancellable
,GError **error
);
Stores the secret
for the uid
.
If permanently
is TRUE
, the secret is stored in the default keyring.
Otherwise the secret is stored in the memory-only session keyring. If
an error occurs, the function sets error
and returns FALSE
.
Parameters
uid |
a unique identifier of the secret |
|
secret |
the secret to store |
|
permanently |
store permanently or just for the session |
|
cancellable |
optional GCancellable object, or |
|
error |
Since: 3.18
e_secret_store_lookup_sync ()
gboolean e_secret_store_lookup_sync (const gchar *uid
,gchar **out_secret
,GCancellable *cancellable
,GError **error
);
Looks up a secret for the uid
. Both the default and session keyrings
are queried.
Note the boolean return value indicates whether the lookup operation
itself completed successfully, not whether the secret was found. If
no secret was found, the function will set out_secret
to NULL
,
but still return TRUE
. If an error occurs, the function sets error
and returns FALSE
.
Parameters
uid |
a unique identifier of the secret |
|
out_secret |
return location for the secret, or |
[out] |
cancellable |
optional GCancellable object, or |
|
error |
Since: 3.18
e_secret_store_delete_sync ()
gboolean e_secret_store_delete_sync (const gchar *uid
,GCancellable *cancellable
,GError **error
);
Deletes the secret for uid
from either the default keyring or
session keyring.
Note the boolean return value indicates whether the delete operation
itself completed successfully, not whether the secret was found and
deleted. If no such secret was found, the function will still return
TRUE
. If an error occurs, the function sets error
and returns FALSE
.
Parameters
uid |
a unique identifier of the secret |
|
cancellable |
optional GCancellable object, or |
|
error |
Since: 3.18