[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/authentication/
Removed BBB code for 3.1 release.
Garrett Smith
garrett at mojave-corp.com
Fri Jul 29 10:22:56 EDT 2005
Log message for revision 37537:
Removed BBB code for 3.1 release.
Changed:
U Zope3/trunk/src/zope/app/authentication/browser/principalfolder.zcml
D Zope3/trunk/src/zope/app/authentication/browserplugins.py
U Zope3/trunk/src/zope/app/authentication/generic.py
U Zope3/trunk/src/zope/app/authentication/httpplugins.py
U Zope3/trunk/src/zope/app/authentication/interfaces.py
U Zope3/trunk/src/zope/app/authentication/principalfolder.py
D Zope3/trunk/src/zope/app/authentication/principalplugins.py
U Zope3/trunk/src/zope/app/authentication/session.py
-=-
Modified: Zope3/trunk/src/zope/app/authentication/browser/principalfolder.zcml
===================================================================
--- Zope3/trunk/src/zope/app/authentication/browser/principalfolder.zcml 2005-07-29 09:56:48 UTC (rev 37536)
+++ Zope3/trunk/src/zope/app/authentication/browser/principalfolder.zcml 2005-07-29 14:22:56 UTC (rev 37537)
@@ -1,4 +1,4 @@
-<zope:configure
+<zope:configure
xmlns:zope="http://namespaces.zope.org/zope"
xmlns="http://namespaces.zope.org/browser">
@@ -22,7 +22,7 @@
<addform
schema="..principalfolder.IInternalPrincipal"
label="Add Principal Information"
- content_factory="..principalfolder.PrincipalInformation"
+ content_factory="..principalfolder.InternalPrincipal"
arguments="login password title"
keyword_arguments="description"
name="AddPrincipalInformation.html"
@@ -30,8 +30,8 @@
/>
<addMenuItem
- title="Principal Information"
- class="..principalfolder.PrincipalInformation"
+ title="Principal Information"
+ class="..principalfolder.InternalPrincipal"
permission="zope.ManageServices"
view="AddPrincipalInformation.html"
/>
Deleted: Zope3/trunk/src/zope/app/authentication/browserplugins.py
===================================================================
--- Zope3/trunk/src/zope/app/authentication/browserplugins.py 2005-07-29 09:56:48 UTC (rev 37536)
+++ Zope3/trunk/src/zope/app/authentication/browserplugins.py 2005-07-29 14:22:56 UTC (rev 37537)
@@ -1,34 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2004 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Implementations of the session-based and cookie-based extractor and
- challenge plugins.
-
-$Id$
-"""
-
-# BBB, entire module gone in 3.1
-from persistent import Persistent
-from zope.interface import Interface
-from zope.app.container.contained import Contained
-
-class SessionExtractor(Persistent, Contained):
- pass
-
-
-class IFormChallengerLoginPageName(Interface):
- pass
-
-
-class FormChallenger(Persistent, Contained):
- pass
\ No newline at end of file
Modified: Zope3/trunk/src/zope/app/authentication/generic.py
===================================================================
--- Zope3/trunk/src/zope/app/authentication/generic.py 2005-07-29 09:56:48 UTC (rev 37536)
+++ Zope3/trunk/src/zope/app/authentication/generic.py 2005-07-29 14:22:56 UTC (rev 37537)
@@ -27,22 +27,22 @@
class NoChallengeCredentialsPlugin(object):
"""A plugin that doesn't challenge if the principal is authenticated.
-
+
There are two reasonable ways to handle an unauthorized error for an
authenticated principal:
- Inform the user of the unauthorized error
-
+
- Let the user login with a different set of credentials
-
+
Since either approach is reasonable, we need to give the site manager
some way of specifying one of the two policies.
-
+
By default, a user will be challenged for a new set of credentials if
unauthorized. A site manager can insert this plugin in the front of the
plugin list to prevent that challenge from occurring. This will
typically result in an 'Unauthorized' message to the user.
-
+
The 'challenge' behavior of the plugin is simple. To illustrate, we'll
create a plugin:
@@ -64,7 +64,7 @@
challenged the user (even though it actually did nothing). The PAU
will stop trying to challenge and the user will not get a chance to
provide different credentials. The result is typically an error message.
-
+
On the other hand, if the user is unauthenticated:
>>> class Principal(object):
@@ -74,14 +74,14 @@
True
the plugin challenge will return None:
-
+
>>> print challenger.challenge(request)
None
signaling the PAU that it should try the next plugin for a challenge. If
the PAU is configured properly, the user will receive a challenge and be
allowed to provide different credentials.
- """
+ """
implements(interfaces.ICredentialsPlugin)
def extractCredentials(self, request):
@@ -95,7 +95,3 @@
def logout(self, request):
return False
-
-# BBB, gone for 3.1
-class AlreadyAuthenticatedUserChallenger(Persistent, Contained):
- pass
Modified: Zope3/trunk/src/zope/app/authentication/httpplugins.py
===================================================================
--- Zope3/trunk/src/zope/app/authentication/httpplugins.py 2005-07-29 09:56:48 UTC (rev 37536)
+++ Zope3/trunk/src/zope/app/authentication/httpplugins.py 2005-07-29 14:22:56 UTC (rev 37537)
@@ -137,13 +137,3 @@
"""
return False
-
-
-# BBB, everything below is gone for 3.1
-# =============================================================================
-
-class HTTPBasicAuthExtractor(Persistent, Contained):
- pass
-
-class HTTPBasicAuthChallenger(Persistent, Contained):
- pass
Modified: Zope3/trunk/src/zope/app/authentication/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/authentication/interfaces.py 2005-07-29 09:56:48 UTC (rev 37536)
+++ Zope3/trunk/src/zope/app/authentication/interfaces.py 2005-07-29 14:22:56 UTC (rev 37537)
@@ -228,35 +228,3 @@
def __repr__(self):
return "<GroupAdded %r>" % self.principal.id
-
-
-# ----------------------------------------------------------------------------
-# Everything below is BBB to be deleted for 3.1
-
-class IPlugin(zope.interface.Interface):
- pass
-
-class IExtractionPlugin(IPlugin):
- pass
-
-class IChallengePlugin(IPlugin):
- pass
-
-class IExtractionAndChallengePlugin(IExtractionPlugin, IChallengePlugin):
- pass
-
-class IPrincipalIdAwarePlugin(IPlugin):
- pass
-
-class IAuthenticationPlugin(IPrincipalIdAwarePlugin):
- pass
-
-class IPrincipalSearchPlugin(IPrincipalIdAwarePlugin):
- pass
-
-class ISearchableAuthenticationPlugin(IAuthenticationPlugin,
- IPrincipalSearchPlugin):
- pass
-
-class IPrincipalFactoryPlugin(zope.interface.Interface):
- pass
Modified: Zope3/trunk/src/zope/app/authentication/principalfolder.py
===================================================================
--- Zope3/trunk/src/zope/app/authentication/principalfolder.py 2005-07-29 09:56:48 UTC (rev 37536)
+++ Zope3/trunk/src/zope/app/authentication/principalfolder.py 2005-07-29 14:22:56 UTC (rev 37537)
@@ -122,10 +122,6 @@
return getattr(self, attr)
-# BBB, alias gone in 3.1
-PrincipalInformation = InternalPrincipal
-
-
class PrincipalInfo(object):
"""An implementation of IPrincipalInfo used by the principal folder.
Deleted: Zope3/trunk/src/zope/app/authentication/principalplugins.py
===================================================================
--- Zope3/trunk/src/zope/app/authentication/principalplugins.py 2005-07-29 09:56:48 UTC (rev 37536)
+++ Zope3/trunk/src/zope/app/authentication/principalplugins.py 2005-07-29 14:22:56 UTC (rev 37537)
@@ -1,32 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2004 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Principal Factory Plugin
-
-$Id$
-"""
-# =================================
-# BBB entire module, gone in 3.1
-# =================================
-
-__docformat__ = "reStructuredText"
-
-from zope.event import notify
-from zope import interface
-from zope import component
-
-from zope.app.authentication import interfaces
-
-
-class PrincipalFactory(object):
- pass
Modified: Zope3/trunk/src/zope/app/authentication/session.py
===================================================================
--- Zope3/trunk/src/zope/app/authentication/session.py 2005-07-29 09:56:48 UTC (rev 37536)
+++ Zope3/trunk/src/zope/app/authentication/session.py 2005-07-29 14:22:56 UTC (rev 37537)
@@ -68,11 +68,7 @@
"""
implements(ISessionCredentials)
- # BBB the __init__ signature below that makes login and password optional
- # is to allow old-style class SessionCredentials that are already persisted
- # to load. Remove the default args for login and password for the second
- # beta of 3.1.
- def __init__(self, login=None, password=None):
+ def __init__(self, login, password):
self.login = login
self.password = password
More information about the Zope3-Checkins
mailing list