diff --git a/DESCRIPTION b/DESCRIPTION index 2c73594..f26b540 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: tapLock -Title: Seamless SSO for R applications +Title: Seamless SSO for R Applications Version: 0.1.0 Authors@R: c(person(given = "ixpantia, SRL", diff --git a/NAMESPACE b/NAMESPACE index 2fd206a..98a4bb7 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -12,3 +12,4 @@ export(new_google_config) export(new_openid_config) export(sso_shiny_app) export(token) +export(use_futures) diff --git a/R/futures.R b/R/futures.R new file mode 100644 index 0000000..31cbac2 --- /dev/null +++ b/R/futures.R @@ -0,0 +1,16 @@ + +#' @title Use futures for asynchronous computations +#' @description Enable a future plan for asynchronous computations. +#' Since tapLock needs to do calls to external APIs, it can be a good idea +#' to use future to make the calls asynchronous. +#' +#' This function is just meant as a convenience function for the user. +#' We recommend that you read the documentation for the future package +#' to understand how to use it. +#' @param plan A plan object. Defaults to a multicore plan. +#' @param workers Number of workers to use. Defaults to 1. +#' @return This function is called for its side effect. +#' @export +use_futures <- function(plan = future::multicore, workers = 1) { + future::plan(plan, workers = workers) +} diff --git a/man/use_futures.Rd b/man/use_futures.Rd new file mode 100644 index 0000000..0c123d9 --- /dev/null +++ b/man/use_futures.Rd @@ -0,0 +1,25 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/futures.R +\name{use_futures} +\alias{use_futures} +\title{Use futures for asynchronous computations} +\usage{ +use_futures(plan = future::multicore, workers = 1) +} +\arguments{ +\item{plan}{A plan object. Defaults to a multicore plan.} + +\item{workers}{Number of workers to use. Defaults to 1.} +} +\value{ +This function is called for its side effect. +} +\description{ +Enable a future plan for asynchronous computations. +Since tapLock needs to do calls to external APIs, it can be a good idea +to use future to make the calls asynchronous. + +This function is just meant as a convenience function for the user. +We recommend that you read the documentation for the future package +to understand how to use it. +} diff --git a/vignettes/en_securing_shiny_google.Rmd b/vignettes/en_securing_shiny_google.Rmd index 8d80449..6a95926 100644 --- a/vignettes/en_securing_shiny_google.Rmd +++ b/vignettes/en_securing_shiny_google.Rmd @@ -99,7 +99,7 @@ sso_shiny_app(auth_config, ui, server) Deploy your Shiny application as you normally would. The tapLock package handles the authentication process. We recommend deploying your application with a solution like Shiny Server -(Open Source or Pro) or with [Faucet](https://github.com/andyquinterom/faucet). +(Open Source or Pro) or with [faucet](https://github.com/ixpantia/faucet). Solutions like Posit Connect already include authentication and do not require tapLock. diff --git a/vignettes/es_asegura_shiny_con_google.Rmd b/vignettes/es_asegura_shiny_con_google.Rmd index d0e3a85..dfbe490 100644 --- a/vignettes/es_asegura_shiny_con_google.Rmd +++ b/vignettes/es_asegura_shiny_con_google.Rmd @@ -99,7 +99,7 @@ sso_shiny_app(auth_config, ui, server) Despliega tu aplicación Shiny como lo harías normalmente. El paquete tapLock maneja el proceso de autenticación. Recomendamos desplegar tu aplicación con una solución como Shiny Server -(Open Source o Pro) o con [Faucet](https://github.com/andyquinterom/faucet). +(Open Source o Pro) o con [faucet](https://github.com/ixpantia/faucet). Soluciones como Posit Connect ya incluyen autenticación y no requieren tapLock.