Description Usage Arguments Details Value See Also
To make sure that users who access your shiny.crunch.io app are allowed to
access it, use crunchyServer()
instead of shiny::shinyServer()
, and wrap
your UI content inside crunchyBody()
. This will prevent anyone who is not
logged into Crunch in their browser from accessing your app.
1 | crunchyServer(func, authz = getOption("crunchy.authorization"))
|
func |
A |
authz |
A |
To restrict access further to only certain Crunch users, you can set an
authorization method, either by passing a server function to
the authz
argument of this function, or by calling
setCrunchyAuthorization()
.
For a simple example app using crunchyServer()
, copy
system.file("example_apps/crunchy_server/app.R", package="crunchy")
,
supply your dataset id on line 14, and run it.
Invisibly, a Shiny server function with the auth logic wrapped around
func
.
crunchyBody()
for wrapping the UI contents, crunchyPublicBody()
for specifying an alternate UI for when the user is not authenticated,
crunchyUnauthorizedBody()
for giving an alternate UI for users who are
authenticated with Crunch but not authorized to view this app, and
setCrunchyAuthorization()
for governing who is authorized to view
your app.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.