twisted.mail.test.test_pop3.DummyPOP3Auth(DummyPOP3)
class documentationtwisted.mail.test.test_pop3
(View In Hierarchy)
Class to test successful authentication in twisted.mail.pop3.POP3.
Method | __init__ | Undocumented |
Inherited from DummyPOP3:
Method | authenticateUserAPOP | Succeed with a DummyMailbox . |
Inherited from POP3 (via DummyPOP3):
Instance Variable | portal | A portal for authentication. (type: Portal ) |
Instance Variable | factory | A server factory which provides an interface for querying capabilities of
the server. (type: IServerFactory
provider) |
Instance Variable | timeOut | The number of seconds to wait for a command from the client before
disconnecting. (type: int ) |
Instance Variable | schedule | A callable that arranges for an iterator to be cooperatively iterated over
along with all other iterators which have been passed to it such that
runtime is divided between all of them. It returns a deferred which fires
when the iterator finishes. (type: callable that takes interator and returns Deferred ) |
Instance Variable | magic | An APOP challenge. If not set, an APOP challenge string will be generated
when a connection is made. (type: bytes
or None ) |
Instance Variable | mbox | The mailbox for the authenticated user. (type: IMailbox
provider) |
Instance Variable | state | The state which indicates what type of messages are expected from the
client. Valid states are 'COMMAND' and 'AUTH' (type: bytes ) |
Instance Variable | blocked | A list of blocked commands. While a response to a command is being
generated by the server, other commands are blocked. When no command is
outstanding, blocked is set to none. Otherwise, it contains a
list of information about blocked commands. Each list entry consists of
the command and the arguments to the command. (type: None
or list
of 2-tuple
of (1) bytes
(2) tuple
of bytes ) |
Method | connectionMade | Send a greeting to the client after the connection has been made. |
Method | connectionLost | Clean up when the connection has been lost. |
Method | generateMagic | Generate an APOP challenge. |
Method | successResponse | Send a response indicating success. |
Method | failResponse | Send a response indicating failure. |
Method | lineReceived | Pass a received line to a state machine function. |
Method | state_COMMAND | Handle received lines for the COMMAND state in which commands from the client are expected. |
Method | processCommand | Dispatch a command from the client for handling. |
Method | listCapabilities | Return a list of server capabilities suitable for use in a CAPA response. |
Method | do_CAPA | Handle a CAPA command. |
Method | do_AUTH | Handle an AUTH command. |
Method | state_AUTH | Handle received lines for the AUTH state in which an authentication challenge response from the client is expected. |
Method | do_APOP | Handle an APOP command. |
Method | do_USER | Handle a USER command. |
Method | do_PASS | Handle a PASS command. |
Method | do_STAT | Handle a STAT command. |
Method | do_LIST | Handle a LIST command. |
Method | do_UIDL | Handle a UIDL command. |
Method | do_TOP | Handle a TOP command. |
Method | do_RETR | Handle a RETR command. |
Method | transformChunk | Transform a chunk of a message to POP3 message format. |
Method | finishedFileTransfer | Send the termination sequence. |
Method | do_DELE | Handle a DELE command. |
Method | do_NOOP | Handle a NOOP command. |
Method | do_RSET | Handle a RSET command. |
Method | do_LAST | Handle a LAST command. |
Method | do_RPOP | Handle an RPOP command. |
Method | do_QUIT | Handle a QUIT command. |
Method | authenticateUserPASS | Perform authentication for a username/password login. |
Instance Variable | _userIs | The username sent with the USER command. (type: bytes
or None ) |
Instance Variable | _onLogout | The function to be executed when the connection is lost. (type: no-argument callable or None ) |
Instance Variable | _highest | The 1-based index of the highest message retrieved. (type: int ) |
Instance Variable | _auth | Authorization credentials. (type: IUsernameHashedPassword
provider) |
Method | _unblock | Process as many blocked commands as possible. |
Method | _cbMailbox | Complete successful authentication. |
Method | _ebMailbox | Handle an expected authentication failure. |
Method | _ebUnexpected | Handle an unexpected authentication failure. |
Method | _longOperation | Stop timeouts and block further command processing while a long operation completes. |
Method | _coiterate | Direct the output of an iterator to the transport and arrange for iteration to take place. |
Method | _getMessageFile | Retrieve the size and contents of a message. |
Method | _sendMessageContent | Send the contents of a message. |
Inherited from LineOnlyReceiver (via DummyPOP3, POP3):
Class Variable | delimiter | The line-ending delimiter to use. By default this is b'\r\n' . |
Class Variable | MAX_LENGTH | The maximum length of a line to allow (If a sent line is longer than this, the connection is dropped). Default is 16384. |
Method | dataReceived | Translates bytes into lines, and calls lineReceived. |
Method | sendLine | Sends a line to the other end of the connection. |
Method | lineLengthExceeded | Called when the maximum line length has been reached. Override if it needs to be dealt with in some special way. |
Inherited from Protocol (via DummyPOP3, POP3, LineOnlyReceiver):
Method | logPrefix | Return a prefix matching the class name, to identify log messages related to this protocol instance. |
Inherited from BaseProtocol (via DummyPOP3, POP3, LineOnlyReceiver, Protocol):
Method | makeConnection | Make a connection to a transport and a server. |
Inherited from TimeoutMixin (via DummyPOP3, POP3):
Method | callLater | Wrapper around reactor.callLater
for test purpose. |
Method | resetTimeout | Reset the timeout count down. |
Method | setTimeout | Change the timeout period |
Method | timeoutConnection | Called when the connection times out. |
Method | __timedOut | Undocumented |