From e7501a72f7d1dc1b7c0dc4b5b7c1ab561517c0e3 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Fri, 6 Sep 2024 16:22:54 +0100 Subject: [PATCH] Link to OAuth article since it's not a vignette Fixes #398 --- R/oauth-flow-auth-code.R | 5 +++-- R/oauth-flow-client-credentials.R | 3 ++- R/oauth-flow-device.R | 3 ++- R/oauth-flow-jwt.R | 3 ++- R/oauth-flow-password.R | 3 ++- R/oauth-flow-refresh.R | 3 ++- man/oauth_token_cached.Rd | 2 +- man/req_oauth_auth_code.Rd | 5 +++-- man/req_oauth_bearer_jwt.Rd | 3 ++- man/req_oauth_client_credentials.Rd | 3 ++- man/req_oauth_device.Rd | 5 +++-- man/req_oauth_password.Rd | 5 +++-- man/req_oauth_refresh.Rd | 3 ++- 13 files changed, 29 insertions(+), 17 deletions(-) diff --git a/R/oauth-flow-auth-code.R b/R/oauth-flow-auth-code.R index aa6e6f58..f089305d 100644 --- a/R/oauth-flow-auth-code.R +++ b/R/oauth-flow-auth-code.R @@ -11,7 +11,8 @@ #' running on a hosted platform like RStudio Server), provide a custom #' `redirect_uri` and httr2 will prompt the user to enter the code manually. #' -#' Learn more about the overall OAuth authentication flow in `vignette("oauth")`. +#' Learn more about the overall OAuth authentication flow in +#' . #' #' # Security considerations #' @@ -77,7 +78,7 @@ #' the number of times that you need to re-authenticate at the cost of #' storing access credentials on disk. #' -#' Learn more in `vignette("oauth")` +#' Learn more in . #' @param cache_key If you want to cache multiple tokens per app, use this #' key to disambiguate them. #' @returns `req_oauth_auth_code()` returns a modified HTTP [request] that will diff --git a/R/oauth-flow-client-credentials.R b/R/oauth-flow-client-credentials.R index 72292da4..dbca970e 100644 --- a/R/oauth-flow-client-credentials.R +++ b/R/oauth-flow-client-credentials.R @@ -5,7 +5,8 @@ #' `r rfc(6749, 4.4)`. It is used to allow the client to access resources that #' it controls directly, not on behalf of an user. #' -#' Learn more about the overall OAuth authentication flow in `vignette("oauth")`. +#' Learn more about the overall OAuth authentication flow in +#' . #' #' @export #' @family OAuth flows diff --git a/R/oauth-flow-device.R b/R/oauth-flow-device.R index e4eb7668..a64a52ad 100644 --- a/R/oauth-flow-device.R +++ b/R/oauth-flow-device.R @@ -6,7 +6,8 @@ #' ever authenticated an app on your TV, this is probably the flow you've used), #' but it also works well from within R. #' -#' Learn more about the overall OAuth authentication flow in `vignette("oauth")`. +#' Learn more about the overall OAuth authentication flow in +#' . #' #' @export #' @inheritParams oauth_flow_password diff --git a/R/oauth-flow-jwt.R b/R/oauth-flow-jwt.R index 5f5883ae..b3787145 100644 --- a/R/oauth-flow-jwt.R +++ b/R/oauth-flow-jwt.R @@ -6,7 +6,8 @@ #' It is often used for service accounts, accounts that are used primarily in #' automated environments. #' -#' Learn more about the overall OAuth authentication flow in `vignette("oauth")`. +#' Learn more about the overall OAuth authentication flow in +#' . #' #' @export #' @family OAuth flows diff --git a/R/oauth-flow-password.R b/R/oauth-flow-password.R index 620ad2cc..d8b54d21 100644 --- a/R/oauth-flow-password.R +++ b/R/oauth-flow-password.R @@ -5,7 +5,8 @@ #' defined by `r rfc(6749, 4.3)`. It allows the user to supply their password #' once, exchanging it for an access token that can be cached locally. #' -#' Learn more about the overall OAuth authentication flow in `vignette("oauth")`. +#' Learn more about the overall OAuth authentication flow in +#' #' #' @export #' @family OAuth flows diff --git a/R/oauth-flow-refresh.R b/R/oauth-flow-refresh.R index 550e65ce..47b78eee 100644 --- a/R/oauth-flow-refresh.R +++ b/R/oauth-flow-refresh.R @@ -15,7 +15,8 @@ #' this happening a lot, it's a sign that you should be using a different flow #' in your automated tests. #' -#' Learn more about the overall OAuth authentication flow in `vignette("oauth")`. +#' Learn more about the overall OAuth authentication flow in +#' . #' #' @inheritParams req_oauth_auth_code #' @param refresh_token A refresh token. This is equivalent to a password diff --git a/man/oauth_token_cached.Rd b/man/oauth_token_cached.Rd index 642ec3a3..123fe5ee 100644 --- a/man/oauth_token_cached.Rd +++ b/man/oauth_token_cached.Rd @@ -25,7 +25,7 @@ whose names match the argument names of \code{flow}.} the number of times that you need to re-authenticate at the cost of storing access credentials on disk. -Learn more in \code{vignette("oauth")}} +Learn more in \url{https://httr2.r-lib.org/articles/oauth.html}.} \item{cache_key}{If you want to cache multiple tokens per app, use this key to disambiguate them.} diff --git a/man/req_oauth_auth_code.Rd b/man/req_oauth_auth_code.Rd index e28a9d53..95511a1c 100644 --- a/man/req_oauth_auth_code.Rd +++ b/man/req_oauth_auth_code.Rd @@ -82,7 +82,7 @@ completion of the authorization flow to the hosted platform.} the number of times that you need to re-authenticate at the cost of storing access credentials on disk. -Learn more in \code{vignette("oauth")}} +Learn more in \url{https://httr2.r-lib.org/articles/oauth.html}.} \item{cache_key}{If you want to cache multiple tokens per app, use this key to disambiguate them.} @@ -105,7 +105,8 @@ to capture the authorization code. When this is not possible (e.g. when running on a hosted platform like RStudio Server), provide a custom \code{redirect_uri} and httr2 will prompt the user to enter the code manually. -Learn more about the overall OAuth authentication flow in \code{vignette("oauth")}. +Learn more about the overall OAuth authentication flow in +\url{https://httr2.r-lib.org/articles/oauth.html}. } \section{Security considerations}{ The authorization code flow is used for both web applications and native diff --git a/man/req_oauth_bearer_jwt.Rd b/man/req_oauth_bearer_jwt.Rd index 3923dafc..44c2a41e 100644 --- a/man/req_oauth_bearer_jwt.Rd +++ b/man/req_oauth_bearer_jwt.Rd @@ -55,7 +55,8 @@ grant to get an access token, as defined by \href{https://datatracker.ietf.org/d It is often used for service accounts, accounts that are used primarily in automated environments. -Learn more about the overall OAuth authentication flow in \code{vignette("oauth")}. +Learn more about the overall OAuth authentication flow in +\url{https://httr2.r-lib.org/articles/oauth.html}. } \examples{ req_auth <- function(req) { diff --git a/man/req_oauth_client_credentials.Rd b/man/req_oauth_client_credentials.Rd index 34d7a32a..296459de 100644 --- a/man/req_oauth_client_credentials.Rd +++ b/man/req_oauth_client_credentials.Rd @@ -28,7 +28,8 @@ Authenticate using OAuth \strong{client credentials flow}, as defined by \href{https://datatracker.ietf.org/doc/html/rfc6749#section-4.4}{Section 4.4 of RFC 6749}. It is used to allow the client to access resources that it controls directly, not on behalf of an user. -Learn more about the overall OAuth authentication flow in \code{vignette("oauth")}. +Learn more about the overall OAuth authentication flow in +\url{https://httr2.r-lib.org/articles/oauth.html}. } \examples{ req_auth <- function(req) { diff --git a/man/req_oauth_device.Rd b/man/req_oauth_device.Rd index 302cd896..a0ad7964 100644 --- a/man/req_oauth_device.Rd +++ b/man/req_oauth_device.Rd @@ -45,7 +45,7 @@ the documentation.} the number of times that you need to re-authenticate at the cost of storing access credentials on disk. -Learn more in \code{vignette("oauth")}} +Learn more in \url{https://httr2.r-lib.org/articles/oauth.html}.} \item{cache_key}{If you want to cache multiple tokens per app, use this key to disambiguate them.} @@ -63,7 +63,8 @@ It's designed for devices that don't have access to a web browser (if you've ever authenticated an app on your TV, this is probably the flow you've used), but it also works well from within R. -Learn more about the overall OAuth authentication flow in \code{vignette("oauth")}. +Learn more about the overall OAuth authentication flow in +\url{https://httr2.r-lib.org/articles/oauth.html}. } \examples{ req_auth_github <- function(req) { diff --git a/man/req_oauth_password.Rd b/man/req_oauth_password.Rd index 04720e18..6a980d76 100644 --- a/man/req_oauth_password.Rd +++ b/man/req_oauth_password.Rd @@ -45,7 +45,7 @@ interactively.} the number of times that you need to re-authenticate at the cost of storing access credentials on disk. -Learn more in \code{vignette("oauth")}} +Learn more in \url{https://httr2.r-lib.org/articles/oauth.html}.} \item{cache_key}{If you want to cache multiple tokens per app, use this key to disambiguate them.} @@ -59,7 +59,8 @@ This function implements the OAuth \strong{resource owner password flow}, as defined by \href{https://datatracker.ietf.org/doc/html/rfc6749#section-4.3}{Section 4.3 of RFC 6749}. It allows the user to supply their password once, exchanging it for an access token that can be cached locally. -Learn more about the overall OAuth authentication flow in \code{vignette("oauth")}. +Learn more about the overall OAuth authentication flow in +\url{https://httr2.r-lib.org/articles/oauth.html} } \examples{ req_auth <- function(req) { diff --git a/man/req_oauth_refresh.Rd b/man/req_oauth_refresh.Rd index 37430cb1..b8029a6c 100644 --- a/man/req_oauth_refresh.Rd +++ b/man/req_oauth_refresh.Rd @@ -54,7 +54,8 @@ retrieve a new update refresh token and update the stored value. If you find this happening a lot, it's a sign that you should be using a different flow in your automated tests. -Learn more about the overall OAuth authentication flow in \code{vignette("oauth")}. +Learn more about the overall OAuth authentication flow in +\url{https://httr2.r-lib.org/articles/oauth.html}. } \examples{ client <- oauth_client("example", "https://example.com/get_token")