[Checkins] SVN: zope.pluggableauth/trunk/ restore compatibility of instances of the zope.app.authentication
Fred Drake
fdrake at gmail.com
Fri Jul 9 16:41:14 EDT 2010
Log message for revision 114438:
restore compatibility of instances of the zope.app.authentication
session credential plugin
(https://mail.zope.org/pipermail/zope-dev/2010-July/040898.html)
Changed:
U zope.pluggableauth/trunk/CHANGES.txt
U zope.pluggableauth/trunk/setup.py
U zope.pluggableauth/trunk/src/zope/pluggableauth/plugins/session.py
-=-
Modified: zope.pluggableauth/trunk/CHANGES.txt
===================================================================
--- zope.pluggableauth/trunk/CHANGES.txt 2010-07-09 20:39:56 UTC (rev 114437)
+++ zope.pluggableauth/trunk/CHANGES.txt 2010-07-09 20:41:13 UTC (rev 114438)
@@ -5,7 +5,11 @@
1.0.2 (unreleased)
------------------
-* ...
+* Added persistent.Persistent and zope.container.contained.Contained as
+ bases zope.pluggableauth.plugins.session.SessionCredentialsPlugin, so
+ instances of zope.app.authentication.session.SessionCredentialsPlugin
+ won't be changed.
+ (https://mail.zope.org/pipermail/zope-dev/2010-July/040898.html)
1.0.1 (2010-02-11)
Modified: zope.pluggableauth/trunk/setup.py
===================================================================
--- zope.pluggableauth/trunk/setup.py 2010-07-09 20:39:56 UTC (rev 114437)
+++ zope.pluggableauth/trunk/setup.py 2010-07-09 20:41:13 UTC (rev 114438)
@@ -47,6 +47,7 @@
extras_require=dict(test=['zope.component[test]']),
install_requires=[
'ZODB3',
+ 'persistent',
'setuptools',
'zope.authentication',
'zope.component',
Modified: zope.pluggableauth/trunk/src/zope/pluggableauth/plugins/session.py
===================================================================
--- zope.pluggableauth/trunk/src/zope/pluggableauth/plugins/session.py 2010-07-09 20:39:56 UTC (rev 114437)
+++ zope.pluggableauth/trunk/src/zope/pluggableauth/plugins/session.py 2010-07-09 20:41:13 UTC (rev 114438)
@@ -15,7 +15,9 @@
"""
__docformat__ = 'restructuredtext'
+import persistent
import transaction
+import zope.container.contained
from urllib import urlencode
from zope.interface import implements, Interface
@@ -100,7 +102,8 @@
default=u"password")
-class SessionCredentialsPlugin(object):
+class SessionCredentialsPlugin(persistent.Persistent,
+ zope.container.contained.Contained):
"""A credentials plugin that uses Zope sessions to get/store credentials.
To illustrate how a session plugin works, we'll first setup some session
@@ -175,6 +178,22 @@
>>> print plugin.extractCredentials(TestRequest())
None
+ Instances are persistent:
+
+ >>> import persistent.interfaces
+
+ >>> persistent.interfaces.IPersistent.providedBy(plugin)
+ True
+ >>> isinstance(plugin, persistent.Persistent)
+ True
+
+ Instances provide IContained:
+
+ >>> import zope.container.interfaces
+
+ >>> zope.container.interfaces.IContained.providedBy(plugin)
+ True
+
"""
implements(ICredentialsPlugin, IBrowserFormChallenger)
More information about the checkins
mailing list