Created
January 10, 2014 12:40
-
-
Save lpetrov/8351277 to your computer and use it in GitHub Desktop.
Strophejs SCRAM-SHA-1 issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _connect = function(jid, password) { | |
var connection = new Strophe.Connection('http://localhost:5280/http-bind'); | |
connection.connect(jid, password, function(status) | |
{ | |
if (status == Strophe.Status.CONNECTING) { | |
console.log('Strophe is connecting.'); | |
} else if (status == Strophe.Status.CONNFAIL) { | |
console.log('Strophe failed to connect.'); | |
} else if (status == Strophe.Status.AUTHFAIL) { | |
console.log('Strophe failed to connect - AUTHFAIL.'); | |
} else if (status == Strophe.Status.DISCONNECTING) { | |
console.log('Strophe is disconnecting.'); | |
} else if (status == Strophe.Status.DISCONNECTED) { | |
console.log('Strophe is disconnected.'); | |
} else if (status == Strophe.Status.CONNECTED) { | |
console.log('Strophe is connected.'); | |
} else { | |
console.error(status); | |
} | |
}); | |
}; | |
_connect("test1@xxx", "test1"); // <- test1 will do an AUTHFAIL | |
_connect("test2@xxx", "test2"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment