Skip to content

Instantly share code, notes, and snippets.

@lpetrov
Created January 10, 2014 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lpetrov/8351277 to your computer and use it in GitHub Desktop.
Save lpetrov/8351277 to your computer and use it in GitHub Desktop.
Strophejs SCRAM-SHA-1 issue
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