View source: R/get_bws_secret.R
get_bws_secret | R Documentation |
This function retrieves the value of a secret stored in your Bitwarden Secrets Manager vault using the specified key.
get_bws_secret(
key,
bws_access_token = get_bws_access_token(),
bws_server_url = get_bws_server_url()
)
key |
A character string representing the key of the secret. |
bws_access_token |
Optional. A character string representing the Bitwarden access token. Defaults to the value of the "BITWARDEN_ACCESS_TOKEN" environment variable. |
bws_server_url |
Optional. A character string representing the Bitwarden server URL. Defaults to the value of the "BWS_SERVER_URL" environment variable. For example "https://vault.bitwarden.eu". |
A character string containing the value of the secret.
## Not run:
# Set environment variables for testing (example values)
Sys.setenv(BWS_ACCESS_TOKEN = "your_access_token_here")
Sys.setenv(BWS_SERVER_URL = "https://vault.bitwarden.eu")
# Retrieve a secret using a key (the key must exist in your vault)
my_secret <- get_bws_secret("my-secret-key")
print(my_secret)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.