pub fn password_store<P: FnOnce(Result<(), Error>) + 'static>(
schema: Option<&Schema>,
attributes: HashMap<&str, &str>,
collection: Option<&str>,
label: &str,
password: &str,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
Expand description
Store a password in the secret service.
The @attributes should be a set of key and value string pairs.
If the attributes match a secret item already stored in the collection, then the item will be updated with these new values.
If @collection is None
, then the default collection will be
used. Use COLLECTION_SESSION
to store the password in the session
collection, which doesn’t get stored across login sessions.
This method will return immediately and complete asynchronously.
§schema
the schema for attributes
§attributes
the attribute keys and values
§collection
a collection alias, or D-Bus object path of the collection where to store the secret
§label
label for the secret
§password
the null-terminated password to store
§cancellable
optional cancellation object
§callback
called when the operation completes