shinyproxy
shinyproxy copied to clipboard
feature request: add a SHINYPROXY_AUTH_STATUS environment variable
Description:
ShinyProxy currently provides the SHINYPROXY_USERNAME environment variable within Shiny apps. However, this variable always contains a value, even when authentication is disabled. This makes it difficult for Shiny apps to programmatically determine the authentication status of the ShinyProxy instance.
Motivation:
There are scenarios where Shiny apps need to adapt their behavior based on whether authentication is enabled or not. For example, an app might:
- Display different content or images depending on the logged-in user or anonymous users.
- Restrict access to certain functionalities based on user roles.
- Tailor the user interface based on authentication requirements.
Proposed Solution:
Introduce a new environment variable named SHINYPROXY_AUTH_STATUS. This variable would return a boolean value (TRUE or FALSE) indicating whether authentication is enabled for the ShinyProxy instance.
Benefits:
- Improved flexibility for Shiny app developers to adapt their apps based on the authentication status.
- Cleaner and more robust code for handling authentication-related logic within Shiny apps.
- Enhanced consistency with other environment variables that provide information about the deployment environment.
Hi
Thank you for your detailed suggestion. I see the need for such an environment variable. I think it might be better to introduce an environment variable SHINYPROXY_AUTH_BACKEND indicating which authentication backend was used to authenticate the user. I think this would support more use-cases. So in your case this would be none. What do you think?
Hi 👋
I think it is an excellent idea. It would cover a variety of use cases including mine.
Hello @LEDfan
I was wondering if there is any timeline or estimated schedule for when this feature might be implemented? This feature is quite important for our use case, and any information on its potential release would be greatly appreciated.
Thank you.