auth_filter: Auth filter for a Plumber API

View source: R/auth_filter.R

auth_filterR Documentation

Auth filter for a Plumber API

Description

Auth filter for a Plumber API

Usage

auth_filter(method = c("basic", "cookie"), api_key = get_api_key())

Arguments

method

The authentication method. Valid options are "basic" and/or "cookie". If "basic" is set, the filter will authenticate the request using basic auth. If "cookie", the filter will authenticate the request using the cookie. If both "cookie" and "basic" are set, then the filter will first attempt to authenticate using the cookie, and, if that fails, it will attempt to authenticate using basic auth. If you use cookie based auth, and you want to send requests directly from the browser, then be sure to set your Plumber API to allow for cookies. See https://polished.tech/blog/polished-plumber for details.

api_key

Your polished API key

Value

a Plumber API filter function


polished documentation built on Feb. 16, 2023, 8:02 p.m.