auth_helpers | R Documentation |
These functions help manage the environment variables that the PhilipsHue package uses to store authentication secrets.
has_local_auth() write_auth(path = ".Renviron", append = TRUE) reset_auth()
path |
file path to write secrets to |
append |
passed to |
Local authentication requires setting two environment variables:
PHILIPS_HUE_BRIDGE_IP
and PHILIPS_HUE_BRIDGE_USERNAME
. has_local_auth()
uses regular expressions to check if these variables are set (but does not
check if the credentials actually work). reset_auth()
sets these variables
to empty strings, and write_auth()
writes the current values to a file
(e.g. an .Renviron
file for use during development).
has_local_auth()
returns a logical value; write_auth()
and
reset_auth()
return TRUE
invisibly upon success.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.