auth_helpers {PhilipsHue}R Documentation

Authentication helpers

Description

These functions help manage the environment variables that the PhilipsHue package uses to store authentication secrets.

Usage

has_local_auth()

write_auth(path = ".Renviron", append = TRUE)

reset_auth()

Arguments

path

file path to write secrets to

append

passed to write()

Details

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).

Value

has_local_auth() returns a logical value; write_auth() and reset_auth() return TRUE invisibly upon success.


[Package PhilipsHue version 1.0.0 Index]