-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
We have a use case, where depending on the system the code runs, it uses OAuth2 via authorisation flow, device flow or client credentials, with proxy and without proxy. In order to write simple code that works in any of these cases, would it make sense to add 'proxy' argument to 'oauth_client'
Line 42 in f52f4b9
| oauth_client <- function( |
oauth_client <- function(
id,
token_url,
secret = NULL,
key = NULL,
auth = c("body", "header", "jwt_sig"),
auth_params = list(),
name = hash(id),
proxy = NULL
) {Then, in oauth_client_get_token one would do something like
Line 243 in f52f4b9
| oauth_client_get_token <- function( |
if(!is.null(client$proxy))
req <- req_proxy(req, client$proxy)We would then create the oauth_client with
client <- oauth_client(
id = "28acfec0674bb3da9f38",
token_url = "https://github.com/login/oauth/access_token",
name = "oauth-test-2",
proxy = curl::ie_get_proxy_for_url()
)related #435
At the moment we use AzureAuth and httr::use_proxy.
Thanks
Metadata
Metadata
Assignees
Labels
No labels