[Zope3-checkins] CVS: Zope3/src/zope/app/security - ftpauth.py:1.1 configure.zcml:1.4 basicvfsauthadapter.py:NONE
Jim Fulton
jim@zope.com
Mon, 3 Feb 2003 10:09:17 -0500
Update of /cvs-repository/Zope3/src/zope/app/security
In directory cvs.zope.org:/tmp/cvs-serv15846/src/zope/app/security
Modified Files:
configure.zcml
Added Files:
ftpauth.py
Removed Files:
basicvfsauthadapter.py
Log Message:
Refactored the ftp framework to make it much simpler, less general,
and easier to maintain. This included ripping out the vfs framework.
=== Added File Zope3/src/zope/app/security/ftpauth.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
#
##############################################################################
# HTTP Basic Authentication adapter
from zope.publisher.interfaces.ftp import IFTPCredentials
from zope.app.security.loginpassword import LoginPassword
class FTPAuth(LoginPassword):
__used_for__ = IFTPCredentials
__request = None
def __init__(self, request):
self.__request = request
lpw = request._authUserPW()
if lpw is None:
login, password = None, None
else:
login, password = lpw
LoginPassword.__init__(self, login, password)
def needLogin(self, realm):
self.__request.unauthorized("Did not work")
=== Zope3/src/zope/app/security/configure.zcml 1.3 => 1.4 ===
--- Zope3/src/zope/app/security/configure.zcml:1.3 Mon Dec 30 22:35:10 2002
+++ Zope3/src/zope/app/security/configure.zcml Mon Feb 3 10:08:44 2003
@@ -52,9 +52,9 @@
provides="zope.app.interfaces.security.ILoginPassword"
for="zope.publisher.interfaces.http.IHTTPCredentials" />
- <adapter factory="zope.app.security.basicvfsauthadapter.BasicVFSAuthAdapter"
+ <adapter factory="zope.app.security.ftpauth.FTPAuth"
provides="zope.app.interfaces.security.ILoginPassword"
- for="zope.publisher.interfaces.vfs.IVFSCredentials" />
+ for="zope.publisher.interfaces.ftp.IFTPCredentials" />
</zopeConfigure>
=== Removed File Zope3/src/zope/app/security/basicvfsauthadapter.py ===