shinyproxy icon indicating copy to clipboard operation
shinyproxy copied to clipboard

Example for Shiny app reading HTTP headers

Open corey-dawson opened this issue 1 year ago • 1 comments

With the new container initialization functionality, username and access groups are no longer set as ENVs in the container, but can be sent as HTTP headers. Is there a shiny example of a shiny app that reads the http headers that can be used to incorporate "initialized containers" functionality? Thanks in advance

corey-dawson avatar May 07 '24 15:05 corey-dawson

Hi, thanks for your interest! We will provide a full example soon, in the meantime, you can access the usernames through the session object like this:

session$request$HTTP_X_SP_USERID
session$request$HTTP_X_SP_USERGROUPS

LEDfan avatar May 07 '24 15:05 LEDfan

We just published a demo for this: https://github.com/openanalytics/shinyproxy-shiny-demo-auth I'll close this issue, but of course feedback is welcome!

LEDfan avatar May 22 '24 06:05 LEDfan