There are no attributes in this class.
challenge(request)
extractCredentials(request)
Extracts the FTP credentials from a request.
First we need to create a FTP request that contains some credentials. Note the path is a required in the envirnoment.
>>> from zope.publisher.ftp import FTPRequest >>> from StringIO import StringIO >>> request = FTPRequest(StringIO(''), ... {'credentials': ('bob', '123'), ... 'path': '/a/b/c'})
Now we create the plugin and get the credentials.
>>> plugin = FTPCredentialsPlugin() >>> plugin.extractCredentials(request) {'login': u'bob', 'password': u'123'}
This only works for FTPRequests.
>>> from zope.publisher.base import TestRequest >>> print plugin.extractCredentials(TestRequest('/')) None
logout(request)
There are no known subclasses.