Skip to content

This is a simple keyring backend, that stores/uses secrets in environment variables of the R session.


It does not support multiple keyrings. It also does not support listing all keys, since there is no way to distinguish keys from regular environment variables.

It does support service names and usernames: they will be separated with a : character in the name of the environment variable. (Note that such an environment variable typically cannot be set or queried from a shell, but it can be set and queried from R or other programming languages.)

See backend for the documentation of the class's methods.


if (FALSE) {
env <- backend_env$new()
env$set("r-keyring-test", username = "donaldduck")
env$get("r-keyring-test", username = "donaldduck")

# This is an error

# Clean up
env$delete("r-keyring-test", username = "donaldduck")