[Web-SIG] Communicating authenticated user information

Clark C. Evans cce at clarkevans.com
Tue Jan 24 04:15:48 CET 2006


On Mon, Jan 23, 2006 at 04:15:06PM -0500, Phillip J. Eby wrote:
| At 03:36 PM 1/23/2006 -0500, Stephan Richter wrote:
| > Specify a new environment variable called 'wsgi.user' (or something 
| > similar) that is a mutable and can be written several times. Only 
| > the last write (before the output is sent) is important. By default
| > the variable is set to ``None`` for not set.

Why not ``wsgi.context`` or something like that which defaults to 
an empty dictionary.  Then you can put what ever you want in it; 
``wsgi.user`` just seems to be a bit too specific.

| I'd suggest a callable under 'wsgi.log_username', that takes one 
| argument.

I think this is way too specific; it doesn't address the general
problem: how do you pass information back up the middleware stack.

| It should be specified whether it requires ASCII or Unicode.

Why cannot it just accept a Python string?  You can always check
if it is Unicode or not.

Best,

Clark


More information about the Web-SIG mailing list