I submitted a patch a few days ago which would let you do this, however
(and would also give you the specific SASL error type (
http://xmpp.org/rfcs/rfc3920.html#rfc.section.6.4 ) and optionally a
predefined message for it based on the explanation in the spec.
So, in my modified version (assuming Massimiliano likes to keep the way
I implemented it), you'd be able to do something like this:
channel.on (
{
event : 'connector',
state : 'sasl-error'
},
function (el) {
var condition = XMPP.getSASLFailureCondition(el.info);
if (condition === 'temporary-auth-failure') { //
Handle a specific type of SASL error message in a special way
alert('Temporary authorization failure for
'+el.account+'; try again later.');
}
else { // Use the default message
alert(XMPP.getSASLFailureMessage(condition));
}
XMPP.close(el.account);
}
);
Brett