| Title: | Seamless Single Sign-on for 'shiny' |
|---|---|
| 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 'shiny' applications for a simplified, unified, and secure authentication process. |
| Authors: | ixpantia, SRL [cph], Andres Quintero [aut, cre] |
| Maintainer: | Andres Quintero <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-05-23 08:13:52 UTC |
| Source: | https://github.com/ixpantia/taplock |
Attaches the necessary authentication layers to a 'tower' object. This will secure any layer added after.
add_auth_layers(tower, config)add_auth_layers(tower, config)
tower |
A 'tower' object from the package 'tower' |
config |
An 'openid_config' object |
A modified 'tower' object with authentication layers
Gets the expiration date and time of an access token
expires_at(token)expires_at(token)
token |
An access_token object |
A POSIXct object containing the date and time the token expires
Gets the expiration time of an access token
expires_in(token)expires_in(token)
token |
An access_token object |
A duration object containing the time until the token expires
"Hello world!" to R.Return string "Hello world!" to R.
hello_world()hello_world()
Checks if an access token is expired
is_expired(token)is_expired(token)
token |
An access_token object |
A boolean indicating if the token is expired
Checks if an access token is valid by checking if it is expired
is_valid(token)is_valid(token)
token |
An access_token object |
A boolean indicating if the token is valid
Creates a new entra_id_config object
new_entra_id_config( tenant_id, client_id, client_secret, app_url, use_refresh_token = TRUE )new_entra_id_config( tenant_id, client_id, client_secret, app_url, use_refresh_token = TRUE )
tenant_id |
The tenant ID for the app |
client_id |
The client ID for the app |
client_secret |
The client secret for the app |
app_url |
The URL for the app |
use_refresh_token |
Enable the use of refresh tokens |
An entra_id_config object
Creates a new google_config object
new_google_config(client_id, client_secret, app_url, use_refresh_token = TRUE)new_google_config(client_id, client_secret, app_url, use_refresh_token = TRUE)
client_id |
The client ID for the app |
client_secret |
The client secret for the app |
app_url |
The URL for the app |
use_refresh_token |
Enable the use of refresh tokens |
A google_config object
Creates a new keycloak_config object
new_keycloak_config( base_url, realm, client_id, client_secret, app_url, use_refresh_token = TRUE )new_keycloak_config( base_url, realm, client_id, client_secret, app_url, use_refresh_token = TRUE )
base_url |
The base URL for the Keycloak instance |
realm |
The realm for the app |
client_id |
The client ID for the app |
client_secret |
The client secret for the app |
app_url |
The URL for the app |
use_refresh_token |
Enable the use of refresh tokens |
A keycloak_config object
Creates a new openid configuration object for the given provider. You can use this function or the individual provider functions.
new_openid_config(provider, app_url, ...)new_openid_config(provider, app_url, ...)
provider |
The openid provider to use |
app_url |
The URL of the application (used to build redirect, login, and logout URLs) |
... |
Additional arguments passed to the provider's configuration. This depends on the provider. The
The
|
An openid_config object
Prints an access token's expiration date
## S3 method for class 'access_token' print(x, ...)## S3 method for class 'access_token' print(x, ...)
x |
An access_token object |
... |
Ignored |
No return value, called for side effects
Gets the access token from the session to be used for internal logic.
token(session = shiny::getDefaultReactiveDomain())token(session = shiny::getDefaultReactiveDomain())
session |
A Shiny session |
An access_token object