shinyproxy-docker-compose-example
shinyproxy-docker-compose-example copied to clipboard
Using Keycloak
Hi! Can I use app-in-compose with Keycloak, I am concerned if it would be possible, because users use the same application, and will it be possible to identify users with SHINYPROXY_USERNAME? I will appreciate any help from your side!
I assume you were asking the app-in-compose case.
Yes, that's correct but it's different from a "normal" ShinyProxy application where SHINYPROXY_USERNAME is an environment variable. In the app-in-compose case, you need to add something like below to nginx.conf:
proxy_set_header SHINYPROXY_USERNAME "${SHINYPROXY_USERNAME}";
proxy_set_header SHINYPROXY_USERGROUPS "${SHINYPROXY_USERGROUPS}";
then, you can get the user name in the shiny app by:
user_info <- session$request$HTTP_ SHINYPROXY_USERNAME