This function checks whether valid credentials are available either in the provided auth object or in the global auth credentials object.
See also
Other credential functions:
khis_base_url()
,
khis_cred()
,
khis_cred_clear()
,
khis_display_name()
,
khis_username()
Examples
if (FALSE) { # \dontrun{
# Set the credentials using global .auth object
khis_cred(username = 'DHIS2 username',
password = 'DHIS2 password',
server = 'https://dhis2-instance/api')
# Check if credentials are available. Should return TRUE
khis_has_cred()
# Clear global credentials
khis_cred_clear()
# Check if credentials are available. Should return FALSE
khis_has_cred()
} # }