Re: How to make REMOTE_USER variable private across WSGI middlewares?
Etienne Robillard <tkadm30-zJpx2rpV7r/[email protected]> Tue, 11 Oct 2016 18:47:32 -0400
| Newsgroups | gmane.comp.python.web |
|---|---|
| Message-ID | <[email protected]> |
Here's the source code: = https://bitbucket.org/tkadm30/django-hotsauce/src/6a862e22e045cb10a84f3b08e= 4c237ed592ecec7/lib/notmm/controllers/wsgi.pyx A live demo is here: http://www.isotopesoftware.ca/ The problem is in the init_request method. The current implementation uses threading.local. I have no idea how to make the WSGI environ object a thread-local in = case the remote user has been logged in. Any input would be greatly appreciated. Regards, Etienne Le 2016-10-10 =E0 10:30, Etienne Robillard a =E9crit : > Hi, > > I'm attempting to develop a OAuth 2.0 authentication middleware which = > sets REMOTE_USER variable into the WSGI environ object, however I'm = > unable to make this variable unique for the logged user. > > Is it recommended to use threading.local or gevent to make the WSGI = > environment persisting on a per-request basis ? > > What others options can you advise to make private request data not = > accessible in WSGI ? > > Thanks in advance, > > Etienne > > -- = Etienne Robillard tkadm30-zJpx2rpV7r/[email protected] http://www.isotopesoftware.ca/ _______________________________________________ Web-SIG mailing list [email protected] Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: https://mail.python.org/mailman/options/web-sig/gcpw-web-sig%4= 0m.gmane.org