R: Create a Secret Service keyring backend

backend_secret_service {keyring} | R Documentation

## Create a Secret Service keyring backend

### Description

This backend is the default on Linux. It uses the libsecret library, and needs a secret service daemon running (e.g. Gnome Keyring, or KWallet). It uses DBUS to communicate with the secret service daemon.

### Usage

    backend_secret_service

### Format

An object of class `R6ClassGenerator` of length 24.

### Details

This backend supports multiple keyrings.

See backend for the documentation of the individual methods. The `is_available()` method checks is a Secret Service daemon is running on the system, by trying to connect to it. It returns a logical scalar, or throws an error, depending on its argument:

    is_available = function(report_error = FALSE)

Argument:

- `report_error` Whether to throw an error if the Secret Service is not available.

### See Also

Other keyring backends: `backend_env`, `backend_file`, `backend_macos`, `backend_wincred`

### Examples

    ## Not run:
    ## This only works on Linux, typically desktop Linux
    kb <- backend_secret_service$new()
    kb$create_keyring("foobar")
    kb$set_default_keyring("foobar")
    kb$set_with_value("service", password = "secret")
    kb$get("service")
    kb$delete("service")
    kb$delete_keyring("foobar")

    ## End(Not run)

[Package keyring version 1.1.0 Index]