| authenticate | R Documentation |
Authenticate a request, either by sending a registered email address
(and, for GBIF, password and username); or by loggin in via the
browser to generate a JWT token. Note that while handling this manually
in-pipe is the most transparent approach, this function is also used to
pass cached information stored via galah_config() to a query.
.
authenticate(
.data,
email = NULL,
username = NULL,
password = NULL,
download_reason_id = NULL,
use_jwt = FALSE,
cache_jwt = FALSE,
...
)
.data |
An object of class |
email |
(string) Email address registered with the selected organisation. |
username |
(string) Registered username (GBIF only). |
password |
(string) Registered password (GBIF only). |
download_reason_id |
(integer) ID for the download reason.
See |
use_jwt |
(logical) Should an OAuth workflow be used for authentication?
Only supported for Flemish and Australian atlases. Defaults to |
cache_jwt |
(logical) Should JWT tokens be cached to disk? Defaults
to |
... |
Other arguments, currently ignored. |
An object of the same class as supplied, but with an added
authenticate slot.
## Not run:
# Authenticate occurrence queries within a pipe without using `galah_config()`
galah_call() |>
authenticate(email = "your-email@email.com") |>
identify("Wollemia nobilis") |>
collect()
# 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()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.