Skip to contents

Sets the KHIS Credentials

Usage

khis_cred(
  config_path = NULL,
  username = NULL,
  password = NULL,
  base_url = NULL
)

Arguments

config_path

An optional parameters that contains the path to configuration file with username and password.

username

The KHIS username. Can be optional if config_path is already provided

password

The KHIS password. Can be optional if config_path is already provided.

base_url

The base url used for the KHIS instance. The default is NULL which is the https://hiskenya.org/api

Value

No return value

Details

The credentials can be provided using a configuration file (more secure) or providing username and password arguments. The config_path is considered more secure since credentials will not appear in the code.

See also

Other credential functions: khis_cred_clear(), khis_has_cred(), khis_username()

Examples


# Load username and password
khis_cred(username = 'khis_username', password = 'PASSWORD')
#>  The credentials have been set.