Comparing version 0.3.0 to 0.3.1
@@ -958,3 +958,3 @@ var util = require('util'), net = require('net'), | ||
if (this._state.status === STATES.NOAUTH) { | ||
if (this.capabilities.indexOf('LOGINDISABLED') > -1) | ||
if (this.capabilities.indexOf('LOGINDISABLED') !== -1) | ||
return cb(new Error('Logging in is disabled on this server')); | ||
@@ -964,7 +964,8 @@ | ||
this._send('AUTHENTICATE XOAUTH ' + escape(this._options.xoauth), fnReturn); | ||
else if (this.capabilities.indexOf('AUTH=PLAIN') !== -1) { | ||
else if (this._options.username !== undefined && | ||
this._options.password !== undefined) { | ||
this._send('LOGIN "' + escape(this._options.username) + '" "' | ||
+ escape(this._options.password) + '"', fnReturn); | ||
} else { | ||
return cb(new Error('Unsupported authentication mechanism(s) detected. ' | ||
return cb(new Error('No supported authentication method(s) available. ' | ||
+ 'Unable to login.')); | ||
@@ -971,0 +972,0 @@ } |
{ "name": "imap", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"author": "Brian White <mscdex@mscdex.net>", | ||
@@ -4,0 +4,0 @@ "description": "An IMAP module for node.js that makes communicating with IMAP servers easy", |
90574
1591