Class: Secret::Service
- Inherits:
-
Gio::DBusProxy
- Object
- Gio::DBusProxy
- Secret::Service
- Defined in:
- (unknown)
Overview
The class for Secret::Service.
Class Method Summary collapse
-
.disconnect ⇒ nil
Disconnect the default Secret::Service proxy returned by [funcService.get] and [funcService.get_sync].
-
.get(flags, cancellable, callback, user_data) ⇒ nil
Get a Secret::Service proxy for the Secret Service.
-
.get_finish(result) ⇒ Secret::Service
Complete an asynchronous operation to get a Secret::Service proxy for the Secret Service.
-
.get_sync(flags, cancellable) ⇒ Secret::Service
Get a Secret::Service proxy for the Secret Service.
-
.open(service_gtype, service_bus_name, flags, cancellable, callback, user_data) ⇒ nil
Create a new Secret::Service proxy for the Secret Service.
-
.open_finish(result) ⇒ Secret::Service
Complete an asynchronous operation to create a new Secret::Service proxy for the Secret Service.
-
.open_sync(service_gtype, service_bus_name, flags, cancellable) ⇒ Secret::Service
Create a new Secret::Service proxy for the Secret Service.
Instance Method Summary collapse
-
#alias_finish=(result) ⇒ Boolean
Finish an asynchronous operation to assign a collection to an alias.
-
#alias_to_dbus_path_finish=(result) ⇒ Boolean
Finish an asynchronous operation to assign a collection to an alias.
-
#clear(schema, attributes, cancellable, callback, user_data) ⇒ nil
Remove unlocked items which match the attributes from the secret service.
-
#clear_finish(result) ⇒ Boolean
Finish asynchronous operation to remove items from the secret service.
-
#clear_sync(schema, attributes, cancellable) ⇒ Boolean
Remove unlocked items which match the attributes from the secret service.
-
#collection_gtype ⇒ GLib::Type
Get the GObject type for collections instantiated by this service.
-
#collections ⇒ Secret::
A list of [classCollection] objects representing the collections in the Secret Service.
-
#collections=(collections) ⇒ Secret::
A list of [classCollection] objects representing the collections in the Secret Service.
-
#create_collection_dbus_path(properties, alias, flags, cancellable, callback, user_data) ⇒ nil
Create a new collection in the secret service, and return its path.
-
#create_collection_dbus_path_finish(result) ⇒ String
Finish asynchronous operation to create a new collection in the secret service.
-
#create_collection_dbus_path_sync(properties, alias, flags, cancellable) ⇒ String
Create a new collection in the secret service and return its path.
-
#create_item_dbus_path(collection_path, properties, value, flags, cancellable, callback, user_data) ⇒ nil
Create a new item in a secret service collection and return its D-Bus object path.
-
#create_item_dbus_path_finish(result) ⇒ String
Finish asynchronous operation to create a new item in the secret service.
-
#create_item_dbus_path_sync(collection_path, properties, value, flags, cancellable) ⇒ String
Create a new item in a secret service collection and return its D-Bus object path.
-
#decode_dbus_secret(value) ⇒ Secret::Value
Decode a [structValue] into [structGLib.Variant] received with the Secret Service DBus API.
-
#delete_item_dbus_path(item_path, cancellable, callback, user_data) ⇒ nil
Delete a secret item from the secret service.
-
#delete_item_dbus_path_finish(result) ⇒ Boolean
Complete an asynchronous operation to delete a secret item from the secret service.
-
#delete_item_dbus_path_sync(item_path, cancellable) ⇒ Boolean
Delete a secret item from the secret service.
-
#encode_dbus_secret(value) ⇒ GLib::Variant
Encodes a [structValue] into [structGLib.Variant] for use with the Secret Service DBus API.
-
#ensure_session(cancellable, callback, user_data) ⇒ nil
Ensure that the Secret::Service proxy has established a session with the Secret Service.
-
#ensure_session_finish(result) ⇒ Boolean
Finish an asynchronous operation to ensure that the Secret::Service proxy has established a session with the Secret Service.
-
#ensure_session_sync(cancellable) ⇒ Boolean
Ensure that the Secret::Service proxy has established a session with the Secret Service.
-
#flags ⇒ Secret::ServiceFlags
Get the flags representing what features of the Secret::Service proxy have been initialized.
-
#get_secret_for_dbus_path(item_path, cancellable, callback, user_data) ⇒ nil
Get the secret value for a secret item stored in the service.
-
#get_secret_for_dbus_path_finish(result) ⇒ Secret::Value
Complete asynchronous operation to get the secret value for an secret item stored in the service.
-
#get_secret_for_dbus_path_sync(item_path, cancellable) ⇒ Secret::Value
Get the secret value for a secret item stored in the service.
-
#get_secrets_for_dbus_paths(item_paths, cancellable, callback, user_data) ⇒ nil
Get the secret values for a secret item stored in the service.
-
#get_secrets_for_dbus_paths_finish(result) ⇒ GLib::HashTable<String>
Complete asynchronous operation to get the secret values for an secret items stored in the service.
-
#get_secrets_for_dbus_paths_sync(item_paths, cancellable) ⇒ GLib::HashTable<String>
Get the secret values for a secret item stored in the service.
-
#item_gtype ⇒ GLib::Type
Get the GObject type for items instantiated by this service.
-
#load_collections(cancellable, callback, user_data) ⇒ nil
Ensure that the Secret::Service proxy has loaded all the collections present in the Secret Service.
-
#load_collections_finish(result) ⇒ Boolean
Complete an asynchronous operation to ensure that the Secret::Service proxy has loaded all the collections present in the Secret Service.
-
#load_collections_sync(cancellable) ⇒ Boolean
Ensure that the Secret::Service proxy has loaded all the collections present in the Secret Service.
-
#lock(objects, cancellable, callback, user_data) ⇒ nil
Lock items or collections in the secret service.
-
#lock_dbus_paths(paths, cancellable, callback, user_data) ⇒ nil
Lock items or collections in the secret service.
-
#lock_dbus_paths_finish(result, locked) ⇒ Integer
Complete asynchronous operation to lock items or collections in the secret service.
-
#lock_dbus_paths_sync(paths, cancellable, locked) ⇒ Integer
Lock items or collections in the secret service.
-
#lock_finish(result, locked) ⇒ Integer
Complete asynchronous operation to lock items or collections in the secret service.
-
#lock_sync(objects, cancellable, locked) ⇒ Integer
Lock items or collections in the secret service.
-
#lookup(schema, attributes, cancellable, callback, user_data) ⇒ nil
Lookup a secret value in the secret service.
-
#lookup_finish(result) ⇒ Secret::Value
Finish asynchronous operation to lookup a secret value in the secret service.
-
#lookup_sync(schema, attributes, cancellable) ⇒ Secret::Value
Lookup a secret value in the secret service.
-
#prompt(prompt, return_type, cancellable, callback, user_data) ⇒ nil
Perform prompting for a [classPrompt].
-
#prompt_at_dbus_path(prompt_path, return_type, cancellable, callback, user_data) ⇒ nil
Perform prompting for a [classPrompt].
-
#prompt_at_dbus_path_finish(result) ⇒ GLib::Variant
Complete asynchronous operation to perform prompting for a [classPrompt].
-
#prompt_at_dbus_path_sync(prompt_path, cancellable, return_type) ⇒ GLib::Variant
Perform prompting for a [classPrompt].
-
#prompt_finish(result) ⇒ GLib::Variant
Complete asynchronous operation to perform prompting for a [classPrompt].
-
#prompt_sync(prompt, cancellable, return_type) ⇒ GLib::Variant
Perform prompting for a [classPrompt].
-
#read_alias_dbus_path(alias, cancellable, callback, user_data) ⇒ nil
Lookup which collection is assigned to this alias.
-
#read_alias_dbus_path_finish(result) ⇒ String
Finish an asynchronous operation to lookup which collection is assigned to an alias.
-
#read_alias_dbus_path_sync(alias, cancellable) ⇒ String
Lookup which collection is assigned to this alias.
-
#search(schema, attributes, flags, cancellable, callback, user_data) ⇒ nil
Search for items matching the attributes.
-
#search_finish(result) ⇒ GLib::List<Secret::Item>
Complete asynchronous operation to search for items.
-
#search_for_dbus_paths(schema, attributes, cancellable, callback, user_data) ⇒ nil
Search for items matching the attributes, and return their D-Bus object paths.
-
#search_for_dbus_paths_finish(result, unlocked, locked) ⇒ Boolean
Complete asynchronous operation to search for items, and return their D-Bus object paths.
-
#search_for_dbus_paths_sync(schema, attributes, cancellable, unlocked, locked) ⇒ Boolean
Search for items matching the attributes, and return their D-Bus object paths.
-
#search_sync(schema, attributes, flags, cancellable) ⇒ GLib::List<Secret::Item>
Search for items matching the attributes.
-
#session_algorithms ⇒ String
Get the set of algorithms being used to transfer secrets between this secret service proxy and the Secret Service itself.
-
#session_dbus_path ⇒ String
Get the D-Bus object path of the session object being used to transfer secrets between this secret service proxy and the Secret Service itself.
-
#set_alias(alias, collection, cancellable, callback, user_data) ⇒ nil
Assign a collection to this alias.
-
#set_alias_sync(alias, collection, cancellable) ⇒ Boolean
Assign a collection to this alias.
-
#set_alias_to_dbus_path(alias, collection_path, cancellable, callback, user_data) ⇒ nil
Assign a collection to this alias.
-
#set_alias_to_dbus_path_sync(alias, collection_path, cancellable) ⇒ Boolean
Assign a collection to this alias.
-
#store(schema, attributes, collection, label, value, cancellable, callback, user_data) ⇒ nil
Store a secret value in the secret service.
-
#store_finish(result) ⇒ Boolean
Finish asynchronous operation to store a secret value in the secret service.
-
#store_sync(schema, attributes, collection, label, value, cancellable) ⇒ Boolean
Store a secret value in the secret service.
-
#unlock(objects, cancellable, callback, user_data) ⇒ nil
Unlock items or collections in the secret service.
-
#unlock_dbus_paths(paths, cancellable, callback, user_data) ⇒ nil
Unlock items or collections in the secret service.
-
#unlock_dbus_paths_finish(result, unlocked) ⇒ Integer
Complete asynchronous operation to unlock items or collections in the secret service.
-
#unlock_dbus_paths_sync(paths, cancellable, unlocked) ⇒ Integer
Unlock items or collections in the secret service.
-
#unlock_finish(result, unlocked) ⇒ Integer
Complete asynchronous operation to unlock items or collections in the secret service.
-
#unlock_sync(objects, cancellable, unlocked) ⇒ Integer
Unlock items or collections in the secret service.
Class Method Details
.disconnect ⇒ nil
Disconnect the default Secret::Service proxy returned by [funcService.get] and [funcService.get_sync].
It is not necessary to call this function, but you may choose to do so at program exit. It is useful for testing that memory is not leaked.
This function is safe to call at any time. But if other objects in this library are still referenced, then this will not result in all memory being freed.
.get(flags, cancellable, callback, user_data) ⇒ nil
Get a Secret::Service proxy for the Secret Service.
If such a proxy object already exists, then the same proxy is returned.
If flags contains any flags of which parts of the secret service to ensure are initialized, then those will be initialized before completing.
This method will return immediately and complete asynchronously.
.get_finish(result) ⇒ Secret::Service
Complete an asynchronous operation to get a Secret::Service proxy for the Secret Service.
.get_sync(flags, cancellable) ⇒ Secret::Service
Get a Secret::Service proxy for the Secret Service.
If such a proxy object already exists, then the same proxy is returned.
If flags contains any flags of which parts of the secret service to ensure are initialized, then those will be initialized before returning.
This method may block indefinitely and should not be used in user interface threads.
.open(service_gtype, service_bus_name, flags, cancellable, callback, user_data) ⇒ nil
Create a new Secret::Service proxy for the Secret Service.
This function is rarely used, see [funcService.get] instead.
The service_gtype argument should be set to %SECRET_TYPE_SERVICE or a the type of a derived class.
If flags contains any flags of which parts of the secret service to ensure are initialized, then those will be initialized before returning.
If service_bus_name is nil then the default is used.
This method will return immediately and complete asynchronously.
.open_finish(result) ⇒ Secret::Service
Complete an asynchronous operation to create a new Secret::Service proxy for the Secret Service.
.open_sync(service_gtype, service_bus_name, flags, cancellable) ⇒ Secret::Service
Create a new Secret::Service proxy for the Secret Service.
This function is rarely used, see [funcService.get_sync] instead.
The service_gtype argument should be set to %SECRET_TYPE_SERVICE or a the type of a derived class.
If flags contains any flags of which parts of the secret service to ensure are initialized, then those will be initialized before returning.
If service_bus_name is nil then the default is used.
This method may block indefinitely and should not be used in user interface threads.
Instance Method Details
#alias_finish=(result) ⇒ Boolean
Finish an asynchronous operation to assign a collection to an alias.
#alias_to_dbus_path_finish=(result) ⇒ Boolean
Finish an asynchronous operation to assign a collection to an alias.
#clear(schema, attributes, cancellable, callback, user_data) ⇒ nil
Remove unlocked items which match the attributes from the secret service.
The attributes should be a set of key and value string pairs.
If service is nil, then [funcService.get] will be called to get the default [classService] proxy.
This method will return immediately and complete asynchronously.
#clear_finish(result) ⇒ Boolean
Finish asynchronous operation to remove items from the secret service.
#clear_sync(schema, attributes, cancellable) ⇒ Boolean
Remove unlocked items which match the attributes from the secret service.
The attributes should be a set of key and value string pairs.
If service is nil, then [funcService.get_sync] will be called to get the default [classService] proxy.
This method may block indefinitely and should not be used in user interface threads.
#collection_gtype ⇒ GLib::Type
Get the GObject type for collections instantiated by this service.
This will always be either [classCollection] or derived from it.
#collections ⇒ Secret::
A list of [classCollection] objects representing the collections in the Secret Service.
This list may be nil if the collections have not been loaded.
To load the collections, specify the %SECRET_SERVICE_LOAD_COLLECTIONS initialization flag when calling the [funcService.get] or [funcService.open] functions. Or call the [methodService.load_collections] method.
#collections=(collections) ⇒ Secret::
A list of [classCollection] objects representing the collections in the Secret Service.
This list may be nil if the collections have not been loaded.
To load the collections, specify the %SECRET_SERVICE_LOAD_COLLECTIONS initialization flag when calling the [funcService.get] or [funcService.open] functions. Or call the [methodService.load_collections] method.
#create_collection_dbus_path(properties, alias, flags, cancellable, callback, user_data) ⇒ nil
Create a new collection in the secret service, and return its path.
Using this method requires that you setup a correct hash table of D-Bus properties for the new collection. You may prefer to use [funcCollection.create] which does handles this for you.
An alias is a well-known tag for a collection, such as 'default' (ie: the default collection to store items in). This allows other applications to easily identify and share a collection. If a collection with the alias already exists, then instead of creating a new collection, the existing collection will be returned. If no collection with this alias exists, then a new collection will be created and this alias will be assigned to it.
properties is a set of properties for the new collection. The keys in the
hash table should be interface.property strings like
org.freedesktop.Secret.Collection.Label. The values
in the hash table should be [structGLib.Variant] values of the properties.
If you wish to have a
This method will return immediately and complete asynchronously. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that are required.
#create_collection_dbus_path_finish(result) ⇒ String
Finish asynchronous operation to create a new collection in the secret service.
#create_collection_dbus_path_sync(properties, alias, flags, cancellable) ⇒ String
Create a new collection in the secret service and return its path.
Using this method requires that you setup a correct hash table of D-Bus properties for the new collection. You may prefer to use [funcCollection.create] which does handles this for you.
An alias is a well-known tag for a collection, such as 'default' (ie: the default collection to store items in). This allows other applications to easily identify and share a collection. If a collection with the alias already exists, then instead of creating a new collection, the existing collection will be returned. If no collection with this alias exists, then a new collection will be created and this alias will be assigned to it.
properties is a set of properties for the new collection. The keys in the
hash table should be interface.property strings like
org.freedesktop.Secret.Collection.Label. The values
in the hash table should be [structGLib.Variant] values of the properties.
This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that are required.
#create_item_dbus_path(collection_path, properties, value, flags, cancellable, callback, user_data) ⇒ nil
Create a new item in a secret service collection and return its D-Bus object path.
It is often easier to use [funcpassword_store] or [funcItem.create] rather than using this function. Using this method requires that you setup a correct hash table of D-Bus properties for the new collection.
If the flags contains %SECRET_ITEM_CREATE_REPLACE, then the secret service will search for an item matching the attributes, and update that item instead of creating a new one.
properties is a set of properties for the new collection. The keys in the
hash table should be interface.property strings like
org.freedesktop.Secret.Item.Label. The values
in the hash table should be [structGLib.Variant] values of the properties.
This method will return immediately and complete asynchronously. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that are required.
#create_item_dbus_path_finish(result) ⇒ String
Finish asynchronous operation to create a new item in the secret service.
#create_item_dbus_path_sync(collection_path, properties, value, flags, cancellable) ⇒ String
Create a new item in a secret service collection and return its D-Bus object path.
It is often easier to use [funcpassword_store_sync] or [funcItem.create_sync] rather than using this function. Using this method requires that you setup a correct hash table of D-Bus properties for the new collection.
If the flags contains %SECRET_ITEM_CREATE_REPLACE, then the secret service will search for an item matching the attributes, and update that item instead of creating a new one.
properties is a set of properties for the new collection. The keys in the
hash table should be interface.property strings like
org.freedesktop.Secret.Item.Label. The values
in the hash table should be [structGLib.Variant] values of the properties.
This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that are required.
#decode_dbus_secret(value) ⇒ Secret::Value
Decode a [structValue] into [structGLib.Variant] received with the Secret Service DBus API.
The [structGLib.Variant] should have a (oayays) signature.
A session must have already been established by the [classService], and the encoded secret must be valid for that session.
#delete_item_dbus_path(item_path, cancellable, callback, user_data) ⇒ nil
Delete a secret item from the secret service.
The item is represented by its D-Bus object path. If you already have a [classItem] proxy objects, use use [methodItem.delete] instead.
This method will return immediately and complete asynchronously.
#delete_item_dbus_path_finish(result) ⇒ Boolean
Complete an asynchronous operation to delete a secret item from the secret service.
#delete_item_dbus_path_sync(item_path, cancellable) ⇒ Boolean
Delete a secret item from the secret service.
The item is represented by its D-Bus object path. If you already have a [classItem] proxy objects, use use [methodItem.delete_sync] instead.
This method may block indefinitely and should not be used in user interface threads.
#encode_dbus_secret(value) ⇒ GLib::Variant
Encodes a [structValue] into [structGLib.Variant] for use with the Secret Service DBus API.
The resulting [structGLib.Variant] will have a (oayays) signature.
A session must have already been established by the [classService].
#ensure_session(cancellable, callback, user_data) ⇒ nil
Ensure that the Secret::Service proxy has established a session with the Secret Service.
This session is used to transfer secrets.
It is not normally necessary to call this method, as the session is established as necessary. You can also pass the %SECRET_SERVICE_OPEN_SESSION to [funcService.get] in order to ensure that a session has been established by the time you get the Secret::Service proxy.
This method will return immediately and complete asynchronously.
#ensure_session_finish(result) ⇒ Boolean
Finish an asynchronous operation to ensure that the Secret::Service proxy has established a session with the Secret Service.
#ensure_session_sync(cancellable) ⇒ Boolean
Ensure that the Secret::Service proxy has established a session with the Secret Service.
This session is used to transfer secrets.
It is not normally necessary to call this method, as the session is established as necessary. You can also pass the %SECRET_SERVICE_OPEN_SESSION to [funcService.get_sync] in order to ensure that a session has been established by the time you get the Secret::Service proxy.
This method may block indefinitely and should not be used in user interface threads.
#flags ⇒ Secret::ServiceFlags
Get the flags representing what features of the Secret::Service proxy have been initialized.
Use [methodService.ensure_session] or [methodService.load_collections] to initialize further features and change the flags.
#get_secret_for_dbus_path(item_path, cancellable, callback, user_data) ⇒ nil
Get the secret value for a secret item stored in the service.
The item is represented by its D-Bus object path. If you already have a [classItem] proxy object, use use [methodItem.get_secret] to more simply get its secret value.
This function returns immediately and completes asynchronously.
#get_secret_for_dbus_path_finish(result) ⇒ Secret::Value
Complete asynchronous operation to get the secret value for an secret item stored in the service.
Will return nil if the item is locked.
#get_secret_for_dbus_path_sync(item_path, cancellable) ⇒ Secret::Value
Get the secret value for a secret item stored in the service.
The item is represented by its D-Bus object path. If you already have a [classItem] proxy object, use use [methodItem.load_secret_sync] to more simply get its secret value.
This method may block indefinitely and should not be used in user interface threads.
Will return nil if the item is locked.
#get_secrets_for_dbus_paths(item_paths, cancellable, callback, user_data) ⇒ nil
Get the secret values for a secret item stored in the service.
The items are represented by their D-Bus object paths. If you already have [classItem] proxy objects, use use [funcItem.load_secrets] to more simply get their secret values.
This function returns immediately and completes asynchronously.
#get_secrets_for_dbus_paths_finish(result) ⇒ GLib::HashTable<String>
Complete asynchronous operation to get the secret values for an secret items stored in the service.
Items that are locked will not be included the results.
#get_secrets_for_dbus_paths_sync(item_paths, cancellable) ⇒ GLib::HashTable<String>
Get the secret values for a secret item stored in the service.
The items are represented by their D-Bus object paths. If you already have [classItem] proxy objects, use use [funcItem.load_secrets_sync] to more simply get their secret values.
This method may block indefinitely and should not be used in user interface threads.
Items that are locked will not be included the results.
#item_gtype ⇒ GLib::Type
Get the GObject type for items instantiated by this service.
This will always be either [classItem] or derived from it.
#load_collections(cancellable, callback, user_data) ⇒ nil
Ensure that the Secret::Service proxy has loaded all the collections present in the Secret Service.
This affects the result of [methodService.get_collections].
You can also pass the %SECRET_SERVICE_LOAD_COLLECTIONS to [funcService.get_sync] in order to ensure that the collections have been loaded by the time you get the Secret::Service proxy.
This method will return immediately and complete asynchronously.
#load_collections_finish(result) ⇒ Boolean
Complete an asynchronous operation to ensure that the Secret::Service proxy has loaded all the collections present in the Secret Service.
#load_collections_sync(cancellable) ⇒ Boolean
Ensure that the Secret::Service proxy has loaded all the collections present in the Secret Service.
This affects the result of [methodService.get_collections].
You can also pass the %SECRET_SERVICE_LOAD_COLLECTIONS to [funcService.get_sync] in order to ensure that the collections have been loaded by the time you get the Secret::Service proxy.
This method may block indefinitely and should not be used in user interface threads.
#lock(objects, cancellable, callback, user_data) ⇒ nil
Lock items or collections in the secret service.
The secret service may not be able to lock items individually, and may lock an entire collection instead.
If service is nil, then [funcService.get] will be called to get the default [classService] proxy.
This method returns immediately and completes asynchronously. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that show up.
#lock_dbus_paths(paths, cancellable, callback, user_data) ⇒ nil
Lock items or collections in the secret service.
The items or collections are represented by their D-Bus object paths. If you already have [classItem] and [classCollection] proxy objects, use use [methodService.lock] instead.
The secret service may not be able to lock items individually, and may lock an entire collection instead.
This method returns immediately and completes asynchronously. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that show up.
#lock_dbus_paths_finish(result, locked) ⇒ Integer
Complete asynchronous operation to lock items or collections in the secret service.
The secret service may not be able to lock items individually, and may lock an entire collection instead.
#lock_dbus_paths_sync(paths, cancellable, locked) ⇒ Integer
Lock items or collections in the secret service.
The items or collections are represented by their D-Bus object paths. If you already have [classItem] and [classCollection] proxy objects, use use [methodService.lock_sync] instead.
The secret service may not be able to lock items individually, and may lock an entire collection instead.
This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that show up.
#lock_finish(result, locked) ⇒ Integer
Complete asynchronous operation to lock items or collections in the secret service.
The secret service may not be able to lock items individually, and may lock an entire collection instead.
#lock_sync(objects, cancellable, locked) ⇒ Integer
Lock items or collections in the secret service.
The secret service may not be able to lock items individually, and may lock an entire collection instead.
If service is nil, then [funcService.get_sync] will be called to get the default [classService] proxy.
This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that show up.
#lookup(schema, attributes, cancellable, callback, user_data) ⇒ nil
Lookup a secret value in the secret service.
The attributes should be a set of key and value string pairs.
If service is nil, then [funcService.get] will be called to get the default [classService] proxy.
This method will return immediately and complete asynchronously.
#lookup_finish(result) ⇒ Secret::Value
Finish asynchronous operation to lookup a secret value in the secret service.
If no secret is found then nil is returned.
#lookup_sync(schema, attributes, cancellable) ⇒ Secret::Value
Lookup a secret value in the secret service.
The attributes should be a set of key and value string pairs.
If service is nil, then [funcService.get_sync] will be called to get the default [classService] proxy.
This method may block indefinitely and should not be used in user interface threads.
#prompt(prompt, return_type, cancellable, callback, user_data) ⇒ nil
Perform prompting for a [classPrompt].
This function is called by other parts of this library to handle prompts for the various actions that can require prompting.
Override the Secret::ServiceClass [vfuncService.prompt_async] virtual method to change the behavior of the prompting. The default behavior is to simply run [methodPrompt.perform] on the prompt.
#prompt_at_dbus_path(prompt_path, return_type, cancellable, callback, user_data) ⇒ nil
Perform prompting for a [classPrompt].
This function is called by other parts of this library to handle prompts for the various actions that can require prompting.
Override the Secret::ServiceClass [vfuncService.prompt_async] virtual method to change the behavior of the propmting. The default behavior is to simply run [methodPrompt.perform] on the prompt.
#prompt_at_dbus_path_finish(result) ⇒ GLib::Variant
Complete asynchronous operation to perform prompting for a [classPrompt].
Returns a variant result if the prompt was completed and not dismissed. The type of result depends on the action the prompt is completing, and is defined in the Secret Service DBus API specification.
#prompt_at_dbus_path_sync(prompt_path, cancellable, return_type) ⇒ GLib::Variant
Perform prompting for a [classPrompt].
Override the Secret::ServiceClass [vfuncService.prompt_async] virtual method to change the behavior of the propmting. The default behavior is to simply run [methodPrompt.perform] on the prompt.
Returns a variant result if the prompt was completed and not dismissed. The type of result depends on the action the prompt is completing, and is defined in the Secret Service DBus API specification.
This method may block and should not be used in user interface threads.
#prompt_finish(result) ⇒ GLib::Variant
Complete asynchronous operation to perform prompting for a [classPrompt].
Returns a variant result if the prompt was completed and not dismissed. The type of result depends on the action the prompt is completing, and is defined in the Secret Service DBus API specification.
#prompt_sync(prompt, cancellable, return_type) ⇒ GLib::Variant
Perform prompting for a [classPrompt].
Runs a prompt and performs the prompting. Returns a variant result if the prompt was completed and not dismissed. The type of result depends on the action the prompt is completing, and is defined in the Secret Service DBus API specification.
This function is called by other parts of this library to handle prompts for the various actions that can require prompting.
Override the Secret::ServiceClass [vfuncService.prompt_sync] virtual method
to change the behavior of the prompting. The default behavior is to simply
run [methodPrompt.perform_sync] on the prompt with a nil window_id.
#read_alias_dbus_path(alias, cancellable, callback, user_data) ⇒ nil
Lookup which collection is assigned to this alias.
Aliases help determine well known collections, such as 'default'. This method looks up the dbus object path of the well known collection.
This method will return immediately and complete asynchronously.
#read_alias_dbus_path_finish(result) ⇒ String
Finish an asynchronous operation to lookup which collection is assigned to an alias.
This method returns the DBus object path of the collection
#read_alias_dbus_path_sync(alias, cancellable) ⇒ String
Lookup which collection is assigned to this alias.
Aliases help determine well known collections, such as 'default'. This method returns the dbus object path of the collection.
This method may block and should not be used in user interface threads.
#search(schema, attributes, flags, cancellable, callback, user_data) ⇒ nil
Search for items matching the attributes.
All collections are searched. The attributes should be a table of string keys and string values.
If service is nil, then [funcService.get] will be called to get the default [classService] proxy.
If %SECRET_SEARCH_ALL is set in flags, then all the items matching the search will be returned. Otherwise only the first item will be returned. This is almost always the unlocked item that was most recently stored.
If %SECRET_SEARCH_UNLOCK is set in flags, then items will be unlocked if necessary. In either case, locked and unlocked items will match the search and be returned. If the unlock fails, the search does not fail.
If %SECRET_SEARCH_LOAD_SECRETS is set in flags, then the items will have their secret values loaded and available via [methodItem.get_secret].
This function returns immediately and completes asynchronously.
#search_finish(result) ⇒ GLib::List<Secret::Item>
Complete asynchronous operation to search for items.
#search_for_dbus_paths(schema, attributes, cancellable, callback, user_data) ⇒ nil
Search for items matching the attributes, and return their D-Bus object paths.
All collections are searched. The attributes should be a table of string keys and string values.
This function returns immediately and completes asynchronously.
When your callback is called use [methodService.search_for_dbus_paths_finish] to get the results of this function. Only the D-Bus object paths of the items will be returned. If you would like [classItem] objects to be returned instead, then use the [methodService.search] function.
#search_for_dbus_paths_finish(result, unlocked, locked) ⇒ Boolean
Complete asynchronous operation to search for items, and return their D-Bus object paths.
Matching items that are locked or unlocked, have their D-Bus paths placed in the locked or unlocked arrays respectively.
D-Bus object paths of the items will be returned in the unlocked or locked arrays. If you would to have [classItem] objects to be returned instead, then us the [methodService.search] and [methodService.search_finish] functions.
#search_for_dbus_paths_sync(schema, attributes, cancellable, unlocked, locked) ⇒ Boolean
Search for items matching the attributes, and return their D-Bus object paths.
All collections are searched. The attributes should be a table of string keys and string values.
This function may block indefinitely. Use the asynchronous version in user interface threads.
Matching items that are locked or unlocked, have their D-Bus paths placed in the locked or unlocked arrays respectively.
D-Bus object paths of the items will be returned in the unlocked or locked arrays. If you would to have [classItem] objects to be returned instead, then use the [methodService.search_sync] function.
#search_sync(schema, attributes, flags, cancellable) ⇒ GLib::List<Secret::Item>
Search for items matching the attributes.
All collections are searched. The attributes should be a table of string keys and string values.
If service is nil, then [funcService.get_sync] will be called to get the default [classService] proxy.
If %SECRET_SEARCH_ALL is set in flags, then all the items matching the search will be returned. Otherwise only the first item will be returned. This is almost always the unlocked item that was most recently stored.
If %SECRET_SEARCH_UNLOCK is set in flags, then items will be unlocked if necessary. In either case, locked and unlocked items will match the search and be returned. If the unlock fails, the search does not fail.
If %SECRET_SEARCH_LOAD_SECRETS is set in flags, then the items' secret values will be loaded for any unlocked items. Loaded item secret values are available via [methodItem.get_secret]. If the load of a secret values fail, then the
This function may block indefinitely. Use the asynchronous version in user interface threads.
#session_algorithms ⇒ String
Get the set of algorithms being used to transfer secrets between this secret service proxy and the Secret Service itself.
This will be nil if no session has been established. Use [methodService.ensure_session] to establish a session.
#session_dbus_path ⇒ String
Get the D-Bus object path of the session object being used to transfer secrets between this secret service proxy and the Secret Service itself.
This will be nil if no session has been established. Use [methodService.ensure_session] to establish a session.
#set_alias(alias, collection, cancellable, callback, user_data) ⇒ nil
Assign a collection to this alias.
Aliases help determine well known collections, such as 'default'.
If service is nil, then [funcService.get] will be called to get the default [classService] proxy.
This method will return immediately and complete asynchronously.
#set_alias_sync(alias, collection, cancellable) ⇒ Boolean
Assign a collection to this alias. Aliases help determine well known collections, such as 'default'.
If service is nil, then [funcService.get_sync] will be called to get the default [classService] proxy.
This method may block and should not be used in user interface threads.
#set_alias_to_dbus_path(alias, collection_path, cancellable, callback, user_data) ⇒ nil
Assign a collection to this alias. Aliases help determine well known collections, such as 'default'. This method takes the dbus object path of the collection to assign to the alias.
This method will return immediately and complete asynchronously.
#set_alias_to_dbus_path_sync(alias, collection_path, cancellable) ⇒ Boolean
Assign a collection to this alias.
Aliases help determine well known collections, such as 'default'. This method takes the dbus object path of the collection to assign to the alias.
This method may block and should not be used in user interface threads.
#store(schema, attributes, collection, label, value, cancellable, callback, user_data) ⇒ nil
Store a secret value 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 service is nil, then [funcService.get] will be called to get the default [classService] proxy.
If collection is not specified, then the default collection will be used. Use [constCOLLECTION_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.
#store_finish(result) ⇒ Boolean
Finish asynchronous operation to store a secret value in the secret service.
#store_sync(schema, attributes, collection, label, value, cancellable) ⇒ Boolean
Store a secret value 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 nil, then the default collection will be used. Use [constCOLLECTION_SESSION] to store the password in the session collection, which doesn't get stored across login sessions.
If service is nil, then [funcService.get_sync] will be called to get the default [classService] proxy.
This method may block indefinitely and should not be used in user interface threads.
#unlock(objects, cancellable, callback, user_data) ⇒ nil
Unlock items or collections in the secret service.
The secret service may not be able to unlock items individually, and may unlock an entire collection instead.
If service is nil, then [funcService.get] will be called to get the default [classService] proxy.
This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that show up.
#unlock_dbus_paths(paths, cancellable, callback, user_data) ⇒ nil
Unlock items or collections in the secret service.
The items or collections are represented by their D-Bus object paths. If you already have [classItem] and [classCollection] proxy objects, use use [methodService.unlock] instead.
The secret service may not be able to unlock items individually, and may unlock an entire collection instead.
This method returns immediately and completes asynchronously. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that show up.
#unlock_dbus_paths_finish(result, unlocked) ⇒ Integer
Complete asynchronous operation to unlock items or collections in the secret service.
The secret service may not be able to unlock items individually, and may unlock an entire collection instead.
#unlock_dbus_paths_sync(paths, cancellable, unlocked) ⇒ Integer
Unlock items or collections in the secret service.
The items or collections are represented by their D-Bus object paths. If you already have [classItem] and [classCollection] proxy objects, use use [methodService.unlock_sync] instead.
The secret service may not be able to unlock items individually, and may unlock an entire collection instead.
This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that show up.
#unlock_finish(result, unlocked) ⇒ Integer
Complete asynchronous operation to unlock items or collections in the secret service.
The secret service may not be able to unlock items individually, and may unlock an entire collection instead.
#unlock_sync(objects, cancellable, unlocked) ⇒ Integer
Unlock items or collections in the secret service.
The secret service may not be able to unlock items individually, and may unlock an entire collection instead.
If service is nil, then [funcService.get_sync] will be called to get the default [classService] proxy.
This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that show up.