'Second part of login.  Get the password the peer wants to
authenticate with.'

def ftp_PASS(self, password):

    if (self.factory.allowAnonymous and (self._user == self.factory.userAnonymous)):
        creds = credentials.Anonymous()
        reply = GUEST_LOGGED_IN_PROCEED
    else:
        creds = credentials.UsernamePassword(self._user, password)
        reply = USR_LOGGED_IN_PROCEED
    del self._user
    def _cbLogin(result):
        (interface, avatar, logout) = result
        assert (interface is IFTPShell), 'The    realm    is    busted,    jerk.'
        self.shell = avatar
        self.logout = logout
        self.workingDirectory = []
        self.state = self.AUTHED
        return reply
    def _ebLogin(failure):
        failure.trap(cred_error.UnauthorizedLogin, cred_error.UnhandledCredentials)
        self.state = self.UNAUTH
        raise AuthorizationError
    d = self.portal.login(creds, None, IFTPShell)
    d.addCallbacks(_cbLogin, _ebLogin)
    return d
