khis_has_cred {khisr} | R Documentation |
Check if DHIS2 Credentials are Available
Description
This function checks whether valid credentials are available either in the provided auth object or in the global auth credentials object.
Usage
khis_has_cred(auth = NULL)
Arguments
auth |
(Optional) An auth object containing DHIS2 credentials. If not provided, the function will check the global auth object for credentials. |
Value
A boolean value indicating whether valid credentials are available.
See Also
Other credential functions:
khis_base_url()
,
khis_cred()
,
khis_cred_clear()
,
khis_display_name()
,
khis_username()
Examples
## Not run:
# 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()
## End(Not run)
[Package khisr version 1.0.6 Index]