Learn R Programming

galah (version 2.2.0)

authenticate: Set up authentication

Description

Add an authentication slot to a query. That slot is then used by later code to determine whether to add an OAuth workflow. It is triggered automatically within capture() if the authenticate argument of galah_config() is set to TRUE, but only for occurrence queries to the Atlas of Living Australia. [Experimental].

Usage

authenticate(.data, cache_disk = FALSE)

Value

An object of the same class as supplied, but with an added authenticate slot.

Arguments

.data

An object of class data_request or metadata_request

cache_disk

(logical) Should JWT tokens be cached to disk? Defaults to FALSE

Examples

Run this code
if (FALSE) {
# use `galah_config()` to set for all occurrence queries
galah_config(authenticate = TRUE)

x <- galah_call() |>
  identify("Wollemia nobilis") |>
  collect()

# use in-pipe for more control
x <- galah_call() |>
  identify("Wollemia nobilis") |>
  authenticate() |>
  collect()
}

Run the code above in your browser using DataLab