O'Reilly logo

Mastering Internet of Things by Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Registering a new account

In XMPP, clients can register for a new account, using the XMPP connection itself. This is called In-Band Registration and is defined in XEP-0077. To enable this feature, you have to call the AllowRegistration() method, before connecting to the network:

this.xmppClient.AllowRegistration(); 

You must also make sure to create the XmppClient using a proper password, not a password hash:

this.xmppClient = new XmppClient(Host, Port, UserName, Password, 
"en", typeof(App).GetTypeInfo().Assembly) 

Once the server gets to the part of authenticating the client and learns that such an account does not exist, it will attempt to register the account, using the credentials provided. If successful, the proper password hash and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required