knitr::opts_chunk$set( collapse = TRUE, comment = "#>", eval = FALSE )
library(councilR)
{councilR}
relies on {keyring}
to securely and consistently access user credentials across machines.
{keyring}
works by accessing your machine's credential storage (macOS Keychain or Windows Credential Store). You can set your credentials using keyring::key_set_with_value()
and access them again with keyring::key_get()
.
keyring::key_set_with_value( service = "councilR.uid", password = "mc\\myuuid" ) keyring::key_set_with_value( service = "councilR.pwd", password = "password" )
Its important to note that your Council password has to be reset periodically. Be sure to update your {keyring}
entry regularly.
FRED-Oracle has separate credentials. You can set them using the same {keyring}
functions. See ?fred_oracle_connection()
for more information.
keyring::key_set_with_value( service = "FREDOracle.uid", password = "uid" ) keyring::key_set_with_value( service = "FREDOracle.pwd", password = "pwd" ) keyring::key_set_with_value( service = "FREDOracle.url", password = "url", ) keyring::key_set_with_value( service = "FREDOracle.dsn", password = "dsn", )
Prior to version 0.3.0, we used getOption("councilR.uid")
andgetOption("councilR.pwd")
. You can assign the new keyring values directly with the code below.
library(keyring) # assign councilR.uid keyring::key_set_with_value( service = "councilR.uid", password = getOption("councilR.uid") ) # do keyring and getOption match? getOption("councilR.uid") == keyring::key_get("councilR.uid") # assign councilR.pwd keyring::key_set_with_value( service = "councilR.pwd", password = getOption("councilR.pwd") ) # do keyring and getOption match? getOption("councilR.pwd") == keyring::key_get("councilR.pwd")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.