sprsquish/blather — pull request #97 by jackhong (2012-06-19 04:05:10+00:00)
Title: Add in-band registration support (XEP 0077)

When xmpp servers with in-band registration support turned on, they will include it inside the feature list, so I decide to extend the initial negotiation process to support the registration without effecting any existing connect methods; and for simplicity, don't have to define a separate registration method.

It basically does following, while users still provide username/password.

* Try authentication (SASL), if all failed, but system supports in-band registration, proceed to the registration process, otherwise failed as normal.
* Once in-band registration succeeded, but not authenticated yet (as in openfire), then retry authentication mechanism; if automatically authenticated (as in ejabbered), make the connection ready.
* If in-band registration failed (means SASL auth also failed by that stage), close the stream.

https://github.com/sprsquish/blather/issues/90

One more little change is to allow pubsub create node dsl method accept a configuration stanza, in our project, we need to configure it by the time of creating pubsub node.

BTW, let me know if you need some additional spec files; the changes didn't break the existing specs, and test scripts inside example folder work too. I tested it with both ejabbered & openfire. (Their implementations of XEP 0077 are surprisingly different ...)

Thanks.