Learn R Programming

restatis (version 0.2.0)

gen_auth_save: gen_auth_save

Description

Save credentials of the different databases for further convenient use

Usage

gen_auth_save(database = c("all", "genesis", "zensus", "regio"))

Value

Path to the RDS file in which credentials are saved, invisibly.

Arguments

database

Character string. The database to store credentials for ('all', 'genesis', 'zensus' or 'regio').

Details

Username and password are encrypted and saved as RDS in the package config directory. A random string is generated and stored in the session environment variable GENESIS_KEY. This string is used as the key to encrypt and decrypt the entered credentials. To avoid havding to save authentication in future sessions, GENESIS_KEY can be added to .Renviron. The usethis package includes a helper function for editing .Renviron files from an R session with usethis::edit_r_environ().

Examples

Run this code
if (FALSE) {
gen_auth_save("zensus")
}

Run the code above in your browser using DataLab