56 && !session.
hasEnv(
"ALLOW_NONSSL_PLAINTEXT_LOGINS")) {
57 session.
setLastError(
"Plain text password authentication is disallowd. "
58 "Please enable StartTLS or TLS in your mail client.");
62 session.
setEnv(
"BINCIMAP_LOGIN",
"LOGIN+" + command.
getTag());
67 session.
setLastError(
"An internal error occurred when you attempted "
68 "to log in to the IMAP server. Please contact "
69 "your system administrator.");
72 session.
setLastError(
"Login failed. Either your user name "
73 "or your password was wrong. Please try again, "
74 "and if the problem persists, please contact "
75 "your system administrator.");
78 bincClient <<
"* BYE Timeout after " << IDLE_TIMEOUT
79 <<
" seconds of inactivity." << endl;
82 bincClient <<
"* BYE The server died unexpectedly. Please contact "
83 "your system administrator for more information." << endl;
102 session.
setLastError(
"Expected single SPACE after LOGIN");
108 session.
setLastError(
"Expected username after LOGIN SPACE");
113 session.
setEnv(
"USER", username);
114 session.
setEnv(
"AUTH_USER", username);
115 session.
setEnv(
"AUTH",
"LOGIN::User");
118 session.
setLastError(
"Expected SPACE after LOGIN SPACE username");
125 "SPACE username SPACE");
Declaration of the common authentication mechanism.
virtual ParseResult parse(Request &) const
ProcessResult process(Depot &, Request &)
const std::string getName(void) const
const std::string & getTag(void) const
const std::string & getUserID(void) const
void setPassword(const std::string &s_in)
void setName(const std::string &s_in)
const std::string & getPassword(void) const
void setUserID(const std::string &s_in)
bool getUidMode(void) const
void setEnv(const std::string &key, const std::string &value)
void setLastError(const std::string &error) const
struct Binc::Session::@3 command
static Session & getInstance(void)
bool hasEnv(const std::string &key) const
Declaration of the IODevice class.
Declaration of the IOFactory class.
int authenticate(Depot &, const std::string &username, const std::string &password, const std::string &challenge)
Operator::ParseResult expectAstring(std::string &s_in)
Operator::ParseResult expectSPACE(void)
Operator::ParseResult expectCRLF(void)
Declaration of all operators.
Declaration of a recursive descent IMAP command parser.