Build token or basic authentication based on given credentials

build_auth(
  api_token = get_wastdr_api_token(),
  api_un = get_wastdr_api_un(),
  api_pw = get_wastdr_api_pw(),
  api_url = get_wastdr_api_url(),
  verbose = get_wastdr_verbose()
)

Arguments

api_token

(character) The WAStD API token, default get_wastdr_api_token, see wastdr_setup

api_un

(character) A WAStD API username, default get_wastdr_api_un, see wastdr_setup

api_pw

(character) A WAStD API password, default get_wastdr_api_pw, see wastdr_setup

api_url

(character) The WAStD API URL, default get_wastdr_api_url, see wastdr_setup

verbose

Whether to show debug messages. Default: wastdr::get_wastdr_verbose()

Value

httr::authenticate() for Basicauth or httr::add_headers for TokenAuth