Skip to contents

[Deprecated]

auth_forward_token() has been renamed to auth_use_token() for clarity. Use auth_use_token() instead.

Usage

auth_forward_token(
  token,
  validate = FALSE,
  expires_in = 3600,
  project_id = NULL,
  realm = "counts"
)

Arguments

token

Character. The API token, with or without "Bearer " prefix.

validate

Logical. If TRUE, validates the token via auth_validate() before setting state. Default FALSE assumes the caller has already validated the token.

expires_in

Numeric. Assumed token lifetime in seconds. Default 3600. Note: this is an estimate; the actual token may expire sooner.

project_id

Integer. Project ID for validation. Only used when validate = TRUE.

realm

Character. The realm to set the token for (default "counts").

Value

Logical (invisibly). TRUE if the token was set successfully, FALSE if validation failed.

See also

auth_use_token() for the current version

Examples

if (FALSE) { # \dontrun{
# Use auth_use_token() instead:
auth_use_token(token, validate = TRUE)
} # }