[Zope-CVS] CVS: Products/PluggableAuthService/interfaces -
request.py:1.1.2.1 plugins.py:1.7.8.1
Sidnei da Silva
sidnei at enfoldsystems.com
Sat Aug 13 00:35:03 EDT 2005
Update of /cvs-repository/Products/PluggableAuthService/interfaces
In directory cvs.zope.org:/tmp/cvs-serv7291/interfaces
Modified Files:
Tag: sidnei-challenge-protocol-chooser
plugins.py
Added Files:
Tag: sidnei-challenge-protocol-chooser
request.py
Log Message:
- Implement Challenge Protocol Chooser, with functional doctests
=== Added File Products/PluggableAuthService/interfaces/request.py ===
##############################################################################
#
# Copyright (c) 2001 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.
#
##############################################################################
""" Interfaces for PluggableAuthService
$Id: request.py,v 1.1.2.1 2005/08/13 04:34:33 sidnei Exp $
"""
# Eventually, those interfaces should be moved to Zope and imported
# here as aliases for backward compatibility.
from Interface import Interface
class IRequest( Interface ):
""" Base Request Interface
XXX Add methods from BaseRequest?
"""
class IHTTPRequest( IRequest ):
""" HTTP Request
"""
class IBrowserRequest( IHTTPRequest ):
"""Browser Request
"""
class IWebDAVRequest( IHTTPRequest ):
""" WebDAV Request
"""
class IXMLRPCRequest( IHTTPRequest ):
""" XML-RPC Request
"""
class IFTPRequest( IRequest ):
""" FTP Request
"""
=== Products/PluggableAuthService/interfaces/plugins.py 1.7 => 1.7.8.1 ===
--- Products/PluggableAuthService/interfaces/plugins.py:1.7 Thu Oct 28 10:08:16 2004
+++ Products/PluggableAuthService/interfaces/plugins.py Sat Aug 13 00:34:33 2005
@@ -427,6 +427,31 @@
scaling issues for some implementations.
"""
+class IRequestTypeSniffer( Interface ):
+
+ """ Given a request, detects the request type for later use by other plugins.
+ """
+ def sniffRequestType( request ):
+ """ Return a interface identifying what kind the request is.
+ """
+
+class IChallengeProtocolChooser( Interface ):
+
+ """ Choose a proper set of protocols to be used for challenging
+ the client given a request.
+ """
+ def chooseProtocols( request ):
+ """ -> ( protocol_1, ... protocol_N) | None
+
+ o If a set of protocols is returned, the first plugin with a
+ protocol that is in the set will define the protocol to be
+ used for the current request.
+
+ o If None is returned, the 'first found protocol' wins.
+
+ o Once the protocol is decided, all challenge plugins for that
+ protocol will be executed.
+ """
#
# XXX: Do we need a LocalRoleAlgorithm plugin type? E.g., base_cms
# has two different algorithms, based on whether or not the
More information about the Zope-CVS
mailing list