Skip to contents

Are There Credentials on Hand?

Usage

khis_has_cred(auth = NULL)

Arguments

auth

The AuthCred credentials

Value

a boolean value indicating if the credentials are available

See also

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

Examples


if (FALSE) {
    # Set the credentials
    khis_cred(username = 'DHIS2 username',
              password = 'DHIS2 password',
              base_url='https://dhis2-instance/api')

    # Check if credentials available. Expect TRUE
    khis_has_cred()

    # Clear credentials
    khis_cred_clear()

    # Check if credentials available. Expect FALSE
    khis_has_cred()
}