comparison plugins/DIGEST-MD5.js @ 65:2e8fbf3bce7f

ANONYMOUS auth plugin.
author Sonny Piers <sonny.piers@gmail.com>
date Wed, 01 Feb 2012 21:23:28 +0100
parents d9f5ae0b6d98
children fa184759fc41
comparison
equal deleted inserted replaced
64:d9f5ae0b6d98 65:2e8fbf3bce7f
37 }, 37 },
38 'features': function (stanza) { 38 'features': function (stanza) {
39 var that = this; 39 var that = this;
40 //TODO check if bind supported 40 //TODO check if bind supported
41 var bind = 41 var bind =
42 "<iq type='set' id='"+Lightstring.newId('sendiq:')+"' xmlns='jabber:client'>" + 42 "<iq type='set' id='"+Lightstring.newId('sendiq:')+"'>" +
43 "<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>" + 43 "<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>" +
44 (this.jid.resource? "<resource>" + this.jid.resource + "</resource>": "") + 44 (this.jid.resource? "<resource>" + this.jid.resource + "</resource>": "") +
45 "</bind>" + 45 "</bind>" +
46 "</iq>"; 46 "</iq>";
47 this.send( 47 this.send(
49 //Success 49 //Success
50 function(stanza) { 50 function(stanza) {
51 //Session http://xmpp.org/rfcs/rfc3921.html#session 51 //Session http://xmpp.org/rfcs/rfc3921.html#session
52 that.jid = new Lightstring.JID(stanza.DOM.textContent); 52 that.jid = new Lightstring.JID(stanza.DOM.textContent);
53 that.send( 53 that.send(
54 "<iq type='set' id='"+Lightstring.newId('sendiq:')+"' xmlns='jabber:client'>" + 54 "<iq type='set' id='"+Lightstring.newId('sendiq:')+"'>" +
55 "<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>" + 55 "<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>" +
56 "</iq>", 56 "</iq>",
57 function() { 57 function() {
58 that.emit('connected'); 58 that.emit('connected');
59 } 59 }