'Handle received lines for the AUTH state in which an authentication
challenge response from the client is expected.
Transition back to the COMMAND state.  Check the credentials and
complete the authorization process with the L{_cbMailbox}
callback function on success or the L{_ebMailbox} and L{_ebUnexpected}
errback functions on failure.
@type line: L{bytes}
@param line: The challenge response.'

def state_AUTH(self, line):

    self.state = 'COMMAND'
    try:
        parts = base64.decodestring(line).split(None, 1)
    except binascii.Error:
        self.failResponse('Invalid    BASE64    encoding')
    else:
        if (len(parts) != 2):
            self.failResponse('Invalid    AUTH    response')
            return
        self._auth.username = parts[0]
        self._auth.response = parts[1]
        d = self.portal.login(self._auth, None, IMailbox)
        d.addCallback(self._cbMailbox, parts[0])
        d.addErrback(self._ebMailbox)
        d.addErrback(self._ebUnexpected)
