illinois / queue

A microservice queue for holding open office hours
University of Illinois/NCSA Open Source License
82 stars 36 forks source link

Allow socket access through access token authentication #339

Open hjstn opened 2 years ago

hjstn commented 2 years ago

Currently, the socket that allows real-time updates on the Queue verifies user authentication using the stored JWT token, which is only present if the user authenticates through Shibboleth. This prevents other services (e.g. apps, etc.) from getting real-time information such as the queue status without regularly polling the Queue's other APIs.

echuber2 commented 2 years ago

Can you give more information about the use case for real-time updates in your course app? Is polling the API causing issues?

hjstn commented 2 years ago

There were a few ideas that I had considered which I believe would beneift from real-time information:

  1. An interactive display board showing the current queue status - polling would work fine but introduces additional complexity in identifying the changes between each poll.
  2. A native queue app for course staff to interact with the queue more easily on mobile devices - polling would probably not work well unless on a very short interval, or it could potentially lead to multiple staff attempting to answer the same question or similar issues.

I think that it may be better to bring up a WebView to handle Shibboleth authentication in the latter case and use the real-time socket as normal, but I'm not sure what the best strategy to work around the lack of real-time information for the first case.