[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security - ILoginPassword.py:1.1.2.1 LoginPassword.py:1.1.2.1
Guido van Rossum
guido@python.org
Wed, 12 Dec 2001 17:54:04 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security
In directory cvs.zope.org:/tmp/cvs-serv1912
Added Files:
Tag: Zope-3x-branch
ILoginPassword.py LoginPassword.py
Log Message:
Add LoginPassword class and ILoginPasswor interface.
=== Added File Zope3/lib/python/Zope/App/Security/ILoginPassword.py ===
from Interface import Interface
class ILoginPassword(Interface):
def getLogin():
"""Return login name, or None if no login name found."""
def getPassword():
"""Return password, or None if no login name found.
If there's a login but no password, return empty string."""
=== Added File Zope3/lib/python/Zope/App/Security/LoginPassword.py ===
from ILoginPassword import ILoginPassword
class LoginPassword:
__implements__ = ILoginPassword
def __init__(self, login, password):
self.__login = login
if login is None:
self.__password = None
else:
self.__password = password or ""
def getLogin(self):
return self.__login
def getPassword(self):
return self.__password