crunchyServer {crunchy} | R Documentation |
A Shiny server with Crunch auth
Description
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.
Usage
crunchyServer(func, authz = getOption("crunchy.authorization"))
Arguments
func |
A |
authz |
A |
Details
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.
Value
Invisibly, a Shiny server function with the auth logic wrapped around
func
.
See Also
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.