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.