Here's a code snippet:
-------------------------------
import webpage, cherrypy, os, fetchusers
from cherrypy.lib import httpauth
class Members(webpage.Webpage):
_cp_config = {'tools.basic_auth.on': True,
'tools.basic_auth.realm': 'localhost',
'tools.basic_auth.users': fetchusers.fetch_users }
""" other stuff follows """
<snip>
-------------------------------
... where fetchusers.fetch_users is a dict of users/passwords.
I have about a 100 username/password combinations in fetchusers and this does
work. They can all authenticate.
But what I need to know is what user just signed in successfully. Is there a
way to retrieve this?
Thanks
Kevin
--
Kevin Coyner GnuPG key: 1024D/8CE11941
I agree this makes sense and was actually implemented in the
httpauthfilter itself recently thanks to a user asking as well :)
It is now implemented in CP3 as of rev1614:
See http://www.cherrypy.org/ticket/653
Hope that helps.
- Sylvain