Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cred_funs

Credential function registry


Description

Functions to query or manipulate the registry of credential functions consulted by token_fetch().

Usage

cred_funs_list()

cred_funs_add(...)

cred_funs_set(ls)

cred_funs_clear()

cred_funs_set_default()

Arguments

...

One or more functions with the right signature: its first argument is named scopes, and it includes ... as an argument.

ls

A list of credential functions.

Value

A list of credential functions or NULL.

Functions

  • cred_funs_list: Get the list of registered credential functions.

  • cred_funs_add: Register one or more new credential fetching functions. Function(s) are added to the front of the list. So:

    * "First registered, last tried."
    * "Last registered, first tried."
    
  • cred_funs_set: Register a list of credential fetching functions.

  • cred_funs_clear: Clear the credential function registry.

  • cred_funs_set_default: Reset the registry to the gargle default.

See Also

token_fetch(), which is where the registry is actually used.

Examples

names(cred_funs_list())

creds_one <- function(scopes, ...) {}
cred_funs_add(creds_one)
cred_funs_add(one = creds_one)
cred_funs_add(one = creds_one, two = creds_one)
cred_funs_add(one = creds_one, creds_one)

# undo all of the above and return to default
cred_funs_set_default()

gargle

Utilities for Working with Google APIs

v1.1.0
MIT + file LICENSE
Authors
Jennifer Bryan [aut, cre] (<https://orcid.org/0000-0002-6983-2759>), Craig Citro [aut], Hadley Wickham [aut] (<https://orcid.org/0000-0003-4757-117X>), Google Inc [cph], RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.