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

Connecting to our broker

The first thing we will need to do is to connect to the XMPP broker we've chosen. We need the name of the host (preferably a domain name), the port number to use, and the client credentials.

XMPP allows us to work with password hashes, depending on the SASL mechanism used to authenticate the client. This is a great data protection mechanism not available in the other protocols discussed. It allows us to persist the hash instead of the actual password. Since the hash value will vary depending on the domain connecting to it, it cannot be reused in other settings, which is often the case when passwords are reused between services.

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