get_token_from_req: get_token_from_req

Description Usage Arguments Details Value See Also

View source: R/utils.R

Description

helper function that extracts the token from the request object based on the token_location argument.

Usage

1
get_token_from_req(req, token_location)

Arguments

req

plumber request object.

token_location

character. Location of token. Either "header" or "cookie". See details.

Details

Specify "header" for the token_location argument if the token is stored in the HTTP Authorization header. Specify "cookie" if the token is stored as an encrypted session cookie called "token" (note that unencrypted cookies are not supported). See the plumber docs for how to set an encrypted cookie.

Value

token

See Also

https://www.rplumber.io/docs/rendering-and-output.html#encrypted-cookies


jandix/sealr documentation built on Oct. 3, 2021, 1:16 p.m.