[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security - BasicAuthAdapter.py:1.1.2.1
Guido van Rossum
guido@python.org
Thu, 13 Dec 2001 12:21:39 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security
In directory cvs.zope.org:/tmp/cvs-serv30934
Added Files:
Tag: Zope-3x-branch
BasicAuthAdapter.py
Log Message:
Add HTTP Basic Authentication Adapter implementation.
=== Added File Zope3/lib/python/Zope/App/Security/BasicAuthAdapter.py ===
# HTTP Basic Authentication adapter
from LoginPassword import LoginPassword
class BasicAuthAdapter(LoginPassword):
def __init__(self, request):
# XXX base64 decoding should be done here, not in request
lpw = request._authUserPW()
if lpw is None:
login, password = None, None
else:
login, password = lpw
LoginPassword.__init__(self, login, password)