[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services/pluggableauth - __init__.py:1.1.2.3
Chris McDonough
chrism@zope.com
Mon, 23 Jun 2003 16:18:05 -0400
Update of /cvs-repository/Zope3/src/zope/app/interfaces/services/pluggableauth
In directory cvs.zope.org:/tmp/cvs-serv8385/src/zope/app/interfaces/services/pluggableauth
Modified Files:
Tag: pluggable_authentication_service-branch
__init__.py
Log Message:
Change earmark style.
=== Zope3/src/zope/app/interfaces/services/pluggableauth/__init__.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/interfaces/services/pluggableauth/__init__.py:1.1.2.2 Sun Jun 22 21:08:22 2003
+++ Zope3/src/zope/app/interfaces/services/pluggableauth/__init__.py Mon Jun 23 16:17:34 2003
@@ -61,19 +61,27 @@
similar to (e.g. contain) the given name.
"""
- def getPrincipalByLogin(login):
- """ Get a principal object based on a login.
-
- Principals may have logins that differ from their id. For example,
- a user may have a login which is his email address. He'd like
- to be able to change his login when his email address changes without
- effecting his security profile on the site.
- """
-
class IWritePrincipalSource(Interface):
- """A read-write source of IPrincipals.
+ """A write-only source of IPrincipals.
"""
class IPrincipalSource(IReadPrincipalSource, IWritePrincipalSource):
"""A read-write principal source."""
+
+class ILoginPasswordPrincipalSource(IPrincipalSource):
+ """ A principal source which can authenticate a user given a
+ login and a password """
+
+ def authenticate(login, password):
+ """ Return a principal matching the login/password pair.
+
+ If there is no principal in this principal source which
+ matches the login/password pair, return None.
+
+ Note: A login is different than an id. Principals may have
+ logins that differ from their id. For example, a user may
+ have a login which is his email address. He'd like to be able
+ to change his login when his email address changes without
+ effecting his security profile on the site. """
+