indigophox commented on PR #34817:
URL: https://github.com/apache/arrow/pull/34817#issuecomment-1828958425

   > Thanks for the suggestions. I haven't try this yet but can I reuse 
`ServerSessionMiddleware` for my case? Or should I implement a similar 
middleware from scratch?
   
   There are arguments either way, but I would think for a more core component 
of another project it would make sense to write something anew even if you 
borrow from what's been done for ServerSessionMiddleware:
   
   * It would make more sense to use a more polished (library) implementation 
for the server-side cookie stuff
   * At some point you're going to have to relate the auth and cookie 
middleware if you want to use a common session cookie (no reason to separate 
them if the lifespans are indeed identical), which means one of (a) a shim 
around the handlers, (b) a wrapper around both middlewares that relate them, or 
(c) combining the two middlewares to have a common session middleware that 
handles auth as well as options.
   * At present there is no callback facility for e.g. session option 
validation, and a richer use case probably needs things like that tied into the 
app implementation rather than just an open-ended K/V store that the app can 
interpret async from the SetSessionOptions/etc. calls.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to