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: | 2024-10-31 23:20:59 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
Gets the issued at time of an access token
get_token_field(token, field)
get_token_field(token, field)
token |
An access_token object |
field |
The field to get from the token |
A POSIXct object containing the date and time the token was issued
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 auth0_config object
new_auth0_config(client_id, client_secret, auth0_domain, app_url)
new_auth0_config(client_id, client_secret, auth0_domain, app_url)
client_id |
The client ID for the app |
client_secret |
The client secret for the app |
auth0_domain |
The domain for the Auth0 tenant |
app_url |
The URL for the app |
An auth0_config object
Creates a new entra_id_config object
new_entra_id_config(tenant_id, client_id, client_secret, app_url)
new_entra_id_config(tenant_id, client_id, client_secret, app_url)
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 |
An entra_id_config object
Creates a new google_config object
new_google_config(client_id, client_secret, app_url)
new_google_config(client_id, client_secret, app_url)
client_id |
The client ID for the app |
client_secret |
The client secret for the app |
app_url |
The URL for the app |
A google_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
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