Class

SecretService

Description [src]

class Secret.Service : Gio.DBusProxy {
  parent: GDBusProxy
}

A proxy object representing the Secret Service.

A SecretService object represents the Secret Service implementation which runs as a D-Bus service.

Normally a single SecretService object can be shared between multiple callers. The secret_service_get() method is used to access this SecretService object. If a new independent SecretService object is required, use secret_service_open().

In order to securely transfer secrets to the Sercret Service, a session is established. This session can be established while initializing a SecretService object by passing the SECRET_SERVICE_OPEN_SESSION flag to the secret_service_get() or secret_service_open() functions. In order to establish a session on an already existing SecretService, use the secret_service_ensure_session() function.

To search for items, use the secret_service_search() method.

Multiple collections can exist in the Secret Service, each of which contains secret items. In order to instantiate SecretCollection objects which represent those collections while initializing a SecretService then pass the SECRET_SERVICE_LOAD_COLLECTIONS flag to the secret_service_get() or secret_service_open() functions. In order to establish a session on an already existing SecretService, use the secret_service_load_collections() function. To access the list of collections use secret_service_get_collections().

Certain actions on the Secret Service require user prompting to complete, such as creating a collection, or unlocking a collection. When such a prompt is necessary, then a SecretPrompt object is created by this library, and passed to the secret_service_prompt() method. In this way it is handled automatically.

In order to customize prompt handling, override the Secret.ServiceClass.prompt_async and Secret.ServiceClass.prompt_finish virtual methods of the SecretService class.

Stability:Stable

Ancestors

  • GDBusProxy
  • GObject

Implements

Instance methods

secret_service_clear

Remove unlocked items which match the attributes from the secret service.

secret_service_clear_finish

Finish asynchronous operation to remove items from the secret service.

secret_service_clear_sync

Remove unlocked items which match the attributes from the secret service.

secret_service_create_collection_dbus_path

Create a new collection in the secret service, and return its path.

secret_service_create_collection_dbus_path_finish

Finish asynchronous operation to create a new collection in the secret service.

secret_service_create_collection_dbus_path_sync

Create a new collection in the secret service and return its path.

secret_service_create_item_dbus_path

Create a new item in a secret service collection and return its D-Bus object path.

secret_service_create_item_dbus_path_finish

Finish asynchronous operation to create a new item in the secret service.

secret_service_create_item_dbus_path_sync

Create a new item in a secret service collection and return its D-Bus object path.

secret_service_decode_dbus_secret

Decode a SecretValue into GVariant received with the Secret Service DBus API.

secret_service_delete_item_dbus_path

Delete a secret item from the secret service.

secret_service_delete_item_dbus_path_finish

Complete an asynchronous operation to delete a secret item from the secret service.

secret_service_delete_item_dbus_path_sync

Delete a secret item from the secret service.

secret_service_encode_dbus_secret

Encodes a SecretValue into GVariant for use with the Secret Service DBus API.

secret_service_ensure_session

Ensure that the SecretService proxy has established a session with the Secret Service.

secret_service_ensure_session_finish

Finish an asynchronous operation to ensure that the SecretService proxy has established a session with the Secret Service.

secret_service_ensure_session_sync

Ensure that the SecretService proxy has established a session with the Secret Service.

secret_service_get_collection_gtype

Get the GObject type for collections instantiated by this service.

secret_service_get_collections

Get a list of SecretCollection objects representing all the collections in the secret service.

secret_service_get_flags

Get the flags representing what features of the SecretService proxy have been initialized.

secret_service_get_item_gtype

Get the GObject type for items instantiated by this service.

secret_service_get_secret_for_dbus_path

Get the secret value for a secret item stored in the service.

secret_service_get_secret_for_dbus_path_finish

Complete asynchronous operation to get the secret value for an secret item stored in the service.

secret_service_get_secret_for_dbus_path_sync

Get the secret value for a secret item stored in the service.

secret_service_get_secrets_for_dbus_paths

Get the secret values for a secret item stored in the service.

secret_service_get_secrets_for_dbus_paths_finish

Complete asynchronous operation to get the secret values for an secret items stored in the service.

secret_service_get_secrets_for_dbus_paths_sync

Get the secret values for a secret item stored in the service.

secret_service_get_session_algorithms

Get the set of algorithms being used to transfer secrets between this secret service proxy and the Secret Service itself.

secret_service_get_session_dbus_path

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.

secret_service_load_collections

Ensure that the SecretService proxy has loaded all the collections present in the Secret Service.

secret_service_load_collections_finish

Complete an asynchronous operation to ensure that the SecretService proxy has loaded all the collections present in the Secret Service.

secret_service_load_collections_sync

Ensure that the SecretService proxy has loaded all the collections present in the Secret Service.

secret_service_lock

Lock items or collections in the secret service.

secret_service_lock_dbus_paths

Lock items or collections in the secret service.

secret_service_lock_dbus_paths_finish

Complete asynchronous operation to lock items or collections in the secret service.

secret_service_lock_dbus_paths_sync

Lock items or collections in the secret service.

secret_service_lock_finish

Complete asynchronous operation to lock items or collections in the secret service.

secret_service_lock_sync

Lock items or collections in the secret service.

secret_service_lookup

Lookup a secret value in the secret service.

secret_service_lookup_finish

Finish asynchronous operation to lookup a secret value in the secret service.

secret_service_lookup_sync

Lookup a secret value in the secret service.

secret_service_prompt

Perform prompting for a SecretPrompt.

secret_service_prompt_at_dbus_path

Perform prompting for a SecretPrompt.

secret_service_prompt_at_dbus_path_finish

Complete asynchronous operation to perform prompting for a SecretPrompt.

secret_service_prompt_at_dbus_path_sync

Perform prompting for a SecretPrompt.

secret_service_prompt_finish

Complete asynchronous operation to perform prompting for a SecretPrompt.

secret_service_prompt_sync

Perform prompting for a SecretPrompt.

secret_service_read_alias_dbus_path

Lookup which collection is assigned to this alias.

secret_service_read_alias_dbus_path_finish

Finish an asynchronous operation to lookup which collection is assigned to an alias.

secret_service_read_alias_dbus_path_sync

Lookup which collection is assigned to this alias.

secret_service_search

Search for items matching the attributes.

secret_service_search_finish

Complete asynchronous operation to search for items.

secret_service_search_for_dbus_paths

Search for items matching the attributes, and return their D-Bus object paths.

secret_service_search_for_dbus_paths_finish

Complete asynchronous operation to search for items, and return their D-Bus object paths.

secret_service_search_for_dbus_paths_sync

Search for items matching the attributes, and return their D-Bus object paths.

secret_service_search_sync

Search for items matching the attributes.

secret_service_set_alias

Assign a collection to this alias.

secret_service_set_alias_finish

Finish an asynchronous operation to assign a collection to an alias.

secret_service_set_alias_sync

Assign a collection to this alias. Aliases help determine well known collections, such as ‘default’.

secret_service_set_alias_to_dbus_path

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.

secret_service_set_alias_to_dbus_path_finish

Finish an asynchronous operation to assign a collection to an alias.

secret_service_set_alias_to_dbus_path_sync

Assign a collection to this alias.

secret_service_store

Store a secret value in the secret service.

secret_service_store_finish

Finish asynchronous operation to store a secret value in the secret service.

secret_service_store_sync

Store a secret value in the secret service.

secret_service_unlock

Unlock items or collections in the secret service.

secret_service_unlock_dbus_paths

Unlock items or collections in the secret service.

secret_service_unlock_dbus_paths_finish

Complete asynchronous operation to unlock items or collections in the secret service.

secret_service_unlock_dbus_paths_sync

Unlock items or collections in the secret service.

secret_service_unlock_finish

Complete asynchronous operation to unlock items or collections in the secret service.

secret_service_unlock_sync

Unlock items or collections in the secret service.

Properties

Secret.Service:collections

A list of SecretCollection objects representing the collections in the Secret Service.

Properties inherited from SecretBackend (1)
Secret.Backend:flags

A set of flags describing which parts of the secret backend have been initialized.

Available since: 0.19.0

Class structure

struct SecretServiceClass {
  GDBusProxyClass parent_class;
  GType collection_gtype;
  GType item_gtype;
  GVariant* (* prompt_sync) (
    SecretService* self,
    SecretPrompt* prompt,
    GCancellable* cancellable,
    const GVariantType* return_type,
    GError** error
  );
  void (* prompt_async) (
    SecretService* self,
    SecretPrompt* prompt,
    const GVariantType* return_type,
    GCancellable* cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data
  );
  GVariant* (* prompt_finish) (
    SecretService* self,
    GAsyncResult* result,
    GError** error
  );
  GType (* get_collection_gtype) (
    SecretService* self
  );
  GType (* get_item_gtype) (
    SecretService* self
  );
  
}
Class members
parent_class
GDBusProxyClass
 

The parent class.

collection_gtype
GType
 

The GType of the SecretCollection objects instantiated by the SecretService proxy.

item_gtype
GType
 

The GType of the SecretItem objects instantiated by the SecretService proxy.

prompt_sync
GVariant* (* prompt_sync) (
    SecretService* self,
    SecretPrompt* prompt,
    GCancellable* cancellable,
    const GVariantType* return_type,
    GError** error
  )
  No description available.
prompt_async
void (* prompt_async) (
    SecretService* self,
    SecretPrompt* prompt,
    const GVariantType* return_type,
    GCancellable* cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data
  )
  No description available.
prompt_finish
GVariant* (* prompt_finish) (
    SecretService* self,
    GAsyncResult* result,
    GError** error
  )
  No description available.
get_collection_gtype
GType (* get_collection_gtype) (
    SecretService* self
  )
  No description available.
get_item_gtype
GType (* get_item_gtype) (
    SecretService* self
  )
  No description available.

Virtual methods

Secret.ServiceClass.get_collection_gtype

Get the GObject type for collections instantiated by this service.

Secret.ServiceClass.get_item_gtype

Get the GObject type for items instantiated by this service.

Secret.ServiceClass.prompt_async
No description available.
Secret.ServiceClass.prompt_finish

Complete asynchronous operation to perform prompting for a SecretPrompt.

Secret.ServiceClass.prompt_sync

Perform prompting for a SecretPrompt.

Functions

secret_service_disconnect

Disconnect the default SecretService proxy returned by secret_service_get() and secret_service_get_sync().

secret_service_get

Get a SecretService proxy for the Secret Service.

secret_service_get_finish

Complete an asynchronous operation to get a SecretService proxy for the Secret Service.

secret_service_get_sync

Get a SecretService proxy for the Secret Service.

secret_service_open

Create a new SecretService proxy for the Secret Service.

secret_service_open_finish

Complete an asynchronous operation to create a new SecretService proxy for the Secret Service.

secret_service_open_sync

Create a new SecretService proxy for the Secret Service.