From 493f95a55f204f7de310f7bb73fab1470d07f243 Mon Sep 17 00:00:00 2001 From: Mauro Lepore Date: Tue, 27 Aug 2024 15:35:23 -0300 Subject: [PATCH] chore(cran): Prepare for CRAN release * Update roxygen2 * Style DESCRIPTION * REVERTME change URLs * REVERTME change maintainer * Use RStudio * Use tidy descrition * Use package-doc * REVERTME creator * Add package-doc * REVERTME change maintainer * Fix param name app_url -> url * Add a simple test to keep tests happy * Check on CI * Use test coverage * Use pkgdown on GHA * Add NEWS.md * Redocument * Use cran-comments.md * Update NEWS.md * Use readme RMD * Polish DESCRIPTION * No rd for internals * No rd for internals * Update LICENSE * 'for R Applications' may be considered redundant by CRAN * Polish DESCRIPTION (remove pakcage name) * Polish DESCRIPTION * REVERTME maintainer * Redocument * REVERTME maintainer * REVERTME maintainer * Use covr * Remove test * Update installation * Update installation * Polish README * Revert "REVERTME maintainer" This reverts commit c4bf049af130ac6f0e91391f77725ad48892a2a6. * Revert "REVERTME maintainer" This reverts commit 91ad24efa2621698d86006d2472f08cff357257a. * Revert "REVERTME maintainer" This reverts commit 1f5983ce3588f4e4c566182a08a85689fd445726. * Revert "REVERTME change maintainer" This reverts commit b4b860017c1c376d878bfcc5bb0a1aae8910c66c. * Revert * Revert "REVERTME change URLs" This reverts commit 0c6c026767620cceb6b6e71e845b800bc93390fd. * Prune --- .Rbuildignore | 6 + .github/.gitignore | 1 + .github/workflows/R-CMD-check.yaml | 52 +++++++++ .github/workflows/pkgdown.yaml | 15 ++- .github/workflows/test-coverage.yaml | 61 ++++++++++ .gitignore | 1 + DESCRIPTION | 46 ++++---- LICENSE | 2 +- LICENSE.md | 2 +- NEWS.md | 3 + R/auth.R | 6 + R/auth0.R | 7 ++ R/tapLock-package.R | 6 + R/utils.R | 2 +- README.Rmd | 129 ++++++++++++++++++++++ README.md | 82 ++++++++------ _pkgdown.yml | 31 +----- codecov.yml | 14 +++ cran-comments.md | 5 + man/access_token.Rd | 20 ---- man/add_trailing_slash.Rd | 2 +- man/get_access_token.Rd | 18 --- man/get_bearer.Rd | 18 --- man/tapLock-package.Rd | 29 +++++ tapLock.Rproj | 22 ++++ vignettes/en_securing_shiny_google.Rmd | 2 +- vignettes/es_asegura_shiny_con_google.Rmd | 2 +- 27 files changed, 434 insertions(+), 150 deletions(-) create mode 100644 .github/.gitignore create mode 100644 .github/workflows/R-CMD-check.yaml create mode 100644 .github/workflows/test-coverage.yaml create mode 100644 NEWS.md create mode 100644 R/tapLock-package.R create mode 100644 README.Rmd create mode 100644 codecov.yml create mode 100644 cran-comments.md delete mode 100644 man/access_token.Rd delete mode 100644 man/get_access_token.Rd delete mode 100644 man/get_bearer.Rd create mode 100644 man/tapLock-package.Rd create mode 100644 tapLock.Rproj diff --git a/.Rbuildignore b/.Rbuildignore index f2e0ac6..19f9f1e 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -4,3 +4,9 @@ ^pkgdown$ ^.github$ ^example$ +^tapLock\.Rproj$ +^\.Rproj\.user$ +^\.github$ +^cran-comments\.md$ +^README\.Rmd$ +^codecov\.yml$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..d46a617 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,52 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: R-CMD-check.yaml + +permissions: read-all + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: macos-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index b7a5210..4bbce75 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -2,9 +2,16 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: [main] + branches: [main, master] + pull_request: + branches: [main, master] + release: + types: [published] + workflow_dispatch: -name: pkgdown +name: pkgdown.yaml + +permissions: read-all jobs: pkgdown: @@ -17,7 +24,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 @@ -36,7 +43,7 @@ jobs: - name: Deploy to GitHub pages 🚀 if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4.4.1 + uses: JamesIves/github-pages-deploy-action@v4.5.0 with: clean: false branch: gh-pages diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml new file mode 100644 index 0000000..9882260 --- /dev/null +++ b/.github/workflows/test-coverage.yaml @@ -0,0 +1,61 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: test-coverage.yaml + +permissions: read-all + +jobs: + test-coverage: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::covr, any::xml2 + needs: coverage + + - name: Test coverage + run: | + cov <- covr::package_coverage( + quiet = FALSE, + clean = FALSE, + install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") + ) + covr::to_cobertura(cov) + shell: Rscript {0} + + - uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }} + file: ./cobertura.xml + plugin: noop + disable_search: true + token: ${{ secrets.CODECOV_TOKEN }} + + - name: Show testthat output + if: always() + run: | + ## -------------------------------------------------------------------- + find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true + shell: bash + + - name: Upload test results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: coverage-test-failures + path: ${{ runner.temp }}/package diff --git a/.gitignore b/.gitignore index d72378a..c9f8940 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,4 @@ rsconnect/ example/.Renviron docs inst/doc +.Rproj.user diff --git a/DESCRIPTION b/DESCRIPTION index f26b540..c5f3795 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,37 +1,37 @@ Package: tapLock -Title: Seamless SSO for R Applications +Title: Seamless Single Sign-On Version: 0.1.0 -Authors@R: - c(person(given = "ixpantia, SRL", - role = "cph", - email = "hola@ixpantia.com"), - person("Andres", "Quintero", , "andres@ixpantia.com", role = c("aut", "cre"))) -Description: The ultimate R package for swift and seamless Single Sign-On (SSO) - integration. Designed for effortless compatibility with popular SSO providers - like Google and Microsoft, tapLock streamlines authentication, enhancing both - user experience and application security. Elevate your R-based projects with - tapLock for a simplified, unified, and secure authentication process. +Authors@R: c( + person("ixpantia, SRL", , , "hola@ixpantia.com", role = "cph"), + person("Andres", "Quintero", , "andres@ixpantia.com", role = c("aut", "cre")) + ) +Description: Swift and seamless Single Sign-On (SSO) integration. Designed + for effortless compatibility with popular Single Sign-On providers + like Google and Microsoft, it streamlines authentication, enhancing + both user experience and application security. Elevate your R-based + projects for a simplified, unified, and secure authentication process. +License: MIT + file LICENSE URL: https://github.com/ixpantia/tapLock BugReports: https://github.com/ixpantia/tapLock/issues -License: MIT + file LICENSE -Encoding: UTF-8 -Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 Imports: - httr2, - stringr, - jose, - purrr, - promises, curl, + future, glue, + httr2, + jose, lubridate, - future, - stats + promises, + purrr, + stats, + stringr Suggests: knitr, rmarkdown, shiny, testthat (>= 3.0.0) -VignetteBuilder: knitr +VignetteBuilder: + knitr Config/testthat/edition: 3 +Encoding: UTF-8 +Roxygen: list(markdown = TRUE) +RoxygenNote: 7.3.2 diff --git a/LICENSE b/LICENSE index fa68449..dbd670e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,2 +1,2 @@ -YEAR: 2023 +YEAR: 2024 COPYRIGHT HOLDER: tapLock authors diff --git a/LICENSE.md b/LICENSE.md index 8e13237..4d139ae 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # MIT License -Copyright (c) 2023 tapLock authors +Copyright (c) 2024 tapLock authors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 0000000..2038629 --- /dev/null +++ b/NEWS.md @@ -0,0 +1,3 @@ +# tapLock 0.1.0 + +* Initialize NEWS.md. diff --git a/R/auth.R b/R/auth.R index 4f0c3fa..82df0ea 100644 --- a/R/auth.R +++ b/R/auth.R @@ -6,11 +6,13 @@ #' #' @return An access_token object #' @keywords internal +#' @noRd access_token <- function(config, token_str) { UseMethod("access_token") } #' @keywords internal +#' @noRd access_token.google_config <- function(config, token_str) { token_data <- decode_token(config, token_str) structure( @@ -25,6 +27,7 @@ access_token.google_config <- function(config, token_str) { } #' @keywords internal +#' @noRd access_token.entra_id_config <- function(config, token_str) { token_data <- decode_token(config, token_str) structure( @@ -39,6 +42,7 @@ access_token.entra_id_config <- function(config, token_str) { } #' @keywords internal +#' @noRd access_token.auth0_config <- function(config, token_str) { token_data <- decode_token(config, token_str) structure( @@ -106,6 +110,7 @@ is_expired <- function(token) { #' #' @return A string containing the Authorization header #' @keywords internal +#' @noRd get_bearer <- function(token) { paste0("Bearer ", token$access_token) } @@ -117,6 +122,7 @@ get_bearer <- function(token) { #' #' @return A string containing the access token #' @keywords internal +#' @noRd get_access_token <- function(token) { token$access_token } diff --git a/R/auth0.R b/R/auth0.R index ac6c89b..f5fd547 100644 --- a/R/auth0.R +++ b/R/auth0.R @@ -1,4 +1,5 @@ #' @keywords internal +#' @noRd build_auth0_login_url <- function(auth_url, client_id, redirect_uri) { url <- httr2::url_parse(auth_url) url$query <- list( @@ -44,16 +45,19 @@ new_auth0_config <- function(client_id, client_secret, auth0_domain, app_url) { } #' @keywords internal +#' @noRd get_login_url.auth0_config <- function(config) { config$login_url } #' @keywords internal +#' @noRd get_logout_url.auth0_config <- function(config) { stop("Not implemented") } #' @keywords internal +#' @noRd request_token.auth0_config <- function(config, authorization_code) { res <- httr2::request(config$token_url) |> httr2::req_method("POST") |> @@ -74,6 +78,7 @@ request_token.auth0_config <- function(config, authorization_code) { } #' @keywords internal +#' @noRd decode_token.auth0_config <- function(config, token) { decoded <- config$jwks |> purrr::map(function(jwk) { @@ -93,11 +98,13 @@ decode_token.auth0_config <- function(config, token) { } #' @keywords internal +#' @noRd get_client_id.auth0_config <- function(config) { config$client_id } #' @keywords internal +#' @noRd shiny_app.auth0_config <- function(config, app) { app_handler <- app$httpHandler login_handler <- function(req) { diff --git a/R/tapLock-package.R b/R/tapLock-package.R new file mode 100644 index 0000000..a65cf64 --- /dev/null +++ b/R/tapLock-package.R @@ -0,0 +1,6 @@ +#' @keywords internal +"_PACKAGE" + +## usethis namespace: start +## usethis namespace: end +NULL diff --git a/R/utils.R b/R/utils.R index 7a69988..f5e112e 100644 --- a/R/utils.R +++ b/R/utils.R @@ -71,7 +71,7 @@ if_length_0 <- function(x, y) { #' @description If the app URL does not end with a slash, this function #' will add one. #' -#' @param app_url A string containing a URL +#' @param url A string containing a URL #' #' @return A string containing the URL with a trailing slash #' @keywords internal diff --git a/README.Rmd b/README.Rmd new file mode 100644 index 0000000..e04e75e --- /dev/null +++ b/README.Rmd @@ -0,0 +1,129 @@ +--- +output: github_document +--- + + + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>", + fig.path = "man/figures/README-", + out.width = "100%" +) +``` + +# tapLock + + +[![R-CMD-check](https://github.com/maurolepore/tapLock/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/maurolepore/tapLock/actions/workflows/R-CMD-check.yaml) +[![Codecov test coverage](https://codecov.io/gh/maurolepore/tapLock/branch/main/graph/badge.svg)](https://app.codecov.io/gh/maurolepore/tapLock?branch=main) + + +The goal of tapLock is to secure your R applications with OpenID Connect and +OAuth 2.0. + +tapLock is an R library that provides a simple interface to integrate OpenID +Connect / OAuth 2.0 authentication into you Shiny applications and Plumber APIs. +tapLock uses a unique approach to effectively secure your applications without +the need to write almost any code. + +## Installation + +You can install tapLock from CRAN with: + +``` r +install.packages("tapLock") +``` + +You can install the development version of tapLock from [GitHub](https://github.com/) with: + +``` r +# install.packages("pak") +pak::pak("ixpantia/tapLock") +``` + +## Example + +### 1. Create an authentication configuration + +``` r +library(taplock) + +auth_config <- new_openid_config( + provider = "entra_id", + # The following values are obtained from the authentication provider + tenant_id = Sys.getenv("TENANT_ID"), + client_id = Sys.getenv("CLIENT_ID"), + client_secret = Sys.getenv("CLIENT_SECRET"), + # This should be the URL of your application + app_url = Sys.getenv("APP_URL") +) +``` + +### 2. Secure your Shiny application + +To secure your Shiny Application you will simply need to expose +an `sso_shiny_app` instead of a regular `shinyApp` at the end of your +`app.R` file. + +Here is an example of a Shiny application that uses tapLock to secure +itself: + +``` r +library(shiny) +library(tapLock) + +auth_config <- new_openid_config( + provider = "entra_id", + tenant_id = Sys.getenv("TENANT_ID"), + client_id = Sys.getenv("CLIENT_ID"), + client_secret = Sys.getenv("CLIENT_SECRET"), + app_url = Sys.getenv("APP_URL") +) + +ui <- fluidPage( + tags$h1("r.sso example"), + textOutput("user") +) + +server <- function(input, output, session) { + + output$user <- renderText({ + given_name <- get_token_field(token(), "given_name") + family_name <- get_token_field(token(), "family_name") + expires_at <- expires_at(token()) + glue::glue( + "Hello {given_name} {family_name}!", + "Your authenticated session will expire at {expires_at}.", + .sep = " " + ) + }) + +} + +sso_shiny_app(auth_config, ui, server) +``` + +## Authentication providers + +tapLock supports the following authentication providers: + +- [Google](https://developers.google.com/identity/protocols/oauth2/openid-connect) +- [Microsoft Entra ID](https://www.microsoft.com/en-us/security/business/identity-access/microsoft-entra-id) + +> If you need support for other providers, please contact us at +> [hola@ixpantia.com](mailto:hola@ixpantia.com). Or, if you are a +> developer, you can contribute to the project by adding support for +> additional providers. + +## Security Model + +tapLock is unique in its approach to securing Shiny applications and Plumber +APIs. tapLock utilizes middlewares that intercept all incoming requests (both +HTTP and WebSocket requests) and validates the authentication token. This +approach allows tapLock to be lean and efficient since no expensive WebSocket +connections are started until the user is authenticated. It also prevents +sensitive data in the UI portion of the application from being exposed to +unauthenticated users. + diff --git a/README.md b/README.md index 7ac7776..3f40bbc 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,42 @@ -# tapLock -Secure your R applications with OpenID Connect and OAuth 2.0. + -## Summary +# tapLock -tapLock is an R library that provides a simple interface to -integrate OpenID Connect / OAuth 2.0 authentication into you Shiny -applications and Plumber APIs. tapLock uses a unique approach to -effectively secure your applications without the need to write almost -any code. + -## Authentication providers +[![R-CMD-check](https://github.com/maurolepore/tapLock/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/maurolepore/tapLock/actions/workflows/R-CMD-check.yaml) +[![Codecov test +coverage](https://codecov.io/gh/maurolepore/tapLock/branch/main/graph/badge.svg)](https://app.codecov.io/gh/maurolepore/tapLock?branch=main) + -tapLock supports the following authentication providers: +The goal of tapLock is to secure your R applications with OpenID Connect +and OAuth 2.0. -- [Google](https://developers.google.com/identity/protocols/oauth2/openid-connect) -- [Microsoft Entra ID](https://www.microsoft.com/en-us/security/business/identity-access/microsoft-entra-id) +tapLock is an R library that provides a simple interface to integrate +OpenID Connect / OAuth 2.0 authentication into you Shiny applications +and Plumber APIs. tapLock uses a unique approach to effectively secure +your applications without the need to write almost any code. -> If you need support for other providers, please contact us at -> [hola@ixpantia.com](mailto:hola@ixpantia.com). Or, if you are a -> developer, you can contribute to the project by adding support for -> additional providers. +## Installation -## Security Model +You can install tapLock from CRAN with: -tapLock is unique in its approach to securing Shiny applications and -Plumber APIs. tapLock utilizes middlewares that intercept all incoming -requests (both HTTP and WebSocket requests) and validates the -authentication token. This approach allows tapLock to be lean and -efficient since no expensive WebSocket connections are started until -the user is authenticated. It also prevents sensitive data in the UI -portion of the application from being exposed to unauthenticated users. - -## How to use tapLock with Shiny +``` r +install.packages("tapLock") +``` -#### 1. Install tapLock +You can install the development version of tapLock from +[GitHub](https://github.com/) with: ``` r -pak::pak("ixpantia/taplock") +# install.packages("pak") +pak::pak("ixpantia/tapLock") ``` -#### 2. Create an authentication configuration +## Example + +### 1. Create an authentication configuration ``` r library(taplock) @@ -56,10 +52,10 @@ auth_config <- new_openid_config( ) ``` -#### 3. Secure your Shiny application +### 2. Secure your Shiny application -To secure your Shiny Application you will simply need to expose -an `sso_shiny_app` instead of a regular `shinyApp` at the end of your +To secure your Shiny Application you will simply need to expose an +`sso_shiny_app` instead of a regular `shinyApp` at the end of your `app.R` file. Here is an example of a Shiny application that uses tapLock to secure @@ -99,3 +95,25 @@ server <- function(input, output, session) { sso_shiny_app(auth_config, ui, server) ``` + +## Authentication providers + +tapLock supports the following authentication providers: + +- [Google](https://developers.google.com/identity/protocols/oauth2/openid-connect) +- [Microsoft Entra + ID](https://www.microsoft.com/en-us/security/business/identity-access/microsoft-entra-id) + +> If you need support for other providers, please contact us at +> . Or, if you are a developer, you can contribute to +> the project by adding support for additional providers. + +## Security Model + +tapLock is unique in its approach to securing Shiny applications and +Plumber APIs. tapLock utilizes middlewares that intercept all incoming +requests (both HTTP and WebSocket requests) and validates the +authentication token. This approach allows tapLock to be lean and +efficient since no expensive WebSocket connections are started until the +user is authenticated. It also prevents sensitive data in the UI portion +of the application from being exposed to unauthenticated users. diff --git a/_pkgdown.yml b/_pkgdown.yml index 51ebb0e..449ae90 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,31 +1,4 @@ -url: ~ +url: https://maurolepore.github.io/tapLock/ template: bootstrap: 5 -reference: -- title: Provider configurations - desc: Setup an authentication provider -- contents: - - new_openid_config - - new_google_config - - new_entra_id_config - - new_auth0_config -- title: Work with token - desc: Interact with the authentication token -- contents: - - get_token_field - - expires_at - - expires_in - - is_expired - - is_valid -- title: Shiny - desc: Functions to use inside Shiny -- contents: - - sso_shiny_app - - token -- title: Utilities - desc: Convenience functions for the user. -- contents: - - use_futures -- title: S3 methods -- contents: - - print.access_token + diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..04c5585 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,14 @@ +comment: false + +coverage: + status: + project: + default: + target: auto + threshold: 1% + informational: true + patch: + default: + target: auto + threshold: 1% + informational: true diff --git a/cran-comments.md b/cran-comments.md new file mode 100644 index 0000000..858617d --- /dev/null +++ b/cran-comments.md @@ -0,0 +1,5 @@ +## R CMD check results + +0 errors | 0 warnings | 1 note + +* This is a new release. diff --git a/man/access_token.Rd b/man/access_token.Rd deleted file mode 100644 index 88fc2cd..0000000 --- a/man/access_token.Rd +++ /dev/null @@ -1,20 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/auth.R -\name{access_token} -\alias{access_token} -\title{Create a new Access Token} -\usage{ -access_token(config, token_str) -} -\arguments{ -\item{config}{An openid_config object} - -\item{token_str}{A string containing the access token to decode} -} -\value{ -An access_token object -} -\description{ -Creates a new access token from a config and a token string -} -\keyword{internal} diff --git a/man/add_trailing_slash.Rd b/man/add_trailing_slash.Rd index 5c1d0a6..9270699 100644 --- a/man/add_trailing_slash.Rd +++ b/man/add_trailing_slash.Rd @@ -7,7 +7,7 @@ add_trailing_slash(url) } \arguments{ -\item{app_url}{A string containing a URL} +\item{url}{A string containing a URL} } \value{ A string containing the URL with a trailing slash diff --git a/man/get_access_token.Rd b/man/get_access_token.Rd deleted file mode 100644 index a13413e..0000000 --- a/man/get_access_token.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/auth.R -\name{get_access_token} -\alias{get_access_token} -\title{Get the access token string} -\usage{ -get_access_token(token) -} -\arguments{ -\item{token}{An access_token object} -} -\value{ -A string containing the access token -} -\description{ -Gets the access token string -} -\keyword{internal} diff --git a/man/get_bearer.Rd b/man/get_bearer.Rd deleted file mode 100644 index 0767303..0000000 --- a/man/get_bearer.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/auth.R -\name{get_bearer} -\alias{get_bearer} -\title{Get the Authorization header for an access token} -\usage{ -get_bearer(token) -} -\arguments{ -\item{token}{An access_token object} -} -\value{ -A string containing the Authorization header -} -\description{ -Gets the Authorization header for an access token -} -\keyword{internal} diff --git a/man/tapLock-package.Rd b/man/tapLock-package.Rd new file mode 100644 index 0000000..a806164 --- /dev/null +++ b/man/tapLock-package.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/tapLock-package.R +\docType{package} +\name{tapLock-package} +\alias{tapLock} +\alias{tapLock-package} +\title{tapLock: Seamless Single Sign-On} +\description{ +Swift and seamless Single Sign-On (SSO) integration. Designed for effortless compatibility with popular Single Sign-On providers like Google and Microsoft, it streamlines authentication, enhancing both user experience and application security. Elevate your R-based projects for a simplified, unified, and secure authentication process. +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/maurolepore/tapLock} + \item \url{https://maurolepore.github.io/tapLock/} + \item Report bugs at \url{https://github.com/maurolepore/tapLock/issues} +} + +} +\author{ +\strong{Maintainer}: + +Other contributors: +\itemize{ + \item ixpantia, SRL \email{hola@ixpantia.com} [copyright holder] +} + +} +\keyword{internal} diff --git a/tapLock.Rproj b/tapLock.Rproj new file mode 100644 index 0000000..69fafd4 --- /dev/null +++ b/tapLock.Rproj @@ -0,0 +1,22 @@ +Version: 1.0 + +RestoreWorkspace: No +SaveWorkspace: No +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +AutoAppendNewline: Yes +StripTrailingWhitespace: Yes +LineEndingConversion: Posix + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source +PackageRoxygenize: rd,collate,namespace diff --git a/vignettes/en_securing_shiny_google.Rmd b/vignettes/en_securing_shiny_google.Rmd index 6a95926..3e4663d 100644 --- a/vignettes/en_securing_shiny_google.Rmd +++ b/vignettes/en_securing_shiny_google.Rmd @@ -31,7 +31,7 @@ Before proceeding, ensure you have the following: Install tapLock from GitHub using the `pak` package: ```r -pak::pak("ixpantia/taplock") +install.packages("tapLock") ``` ## Step 2: Create Google OAuth Credentials diff --git a/vignettes/es_asegura_shiny_con_google.Rmd b/vignettes/es_asegura_shiny_con_google.Rmd index dfbe490..84bec54 100644 --- a/vignettes/es_asegura_shiny_con_google.Rmd +++ b/vignettes/es_asegura_shiny_con_google.Rmd @@ -31,7 +31,7 @@ Antes de proceder, asegúrate de tener lo siguiente: Instala tapLock desde GitHub usando el paquete `pak`: ```r -pak::pak("ixpantia/taplock") +install.packages("tapLock") ``` ## Paso 2: Crear Credenciales OAuth de Google