Question

I'm working with something about IM. It involves XMPP. I develop a app on Android, so I used aSmack. I want to log in google talk, and here (linked below)

https://developers.google.com/talk/open_communications

says google talk only support SASL PLAIN. but when I search in the INTERNET, many people says google talk don't support the SASL so this code is needed:

    connectionConfig.setSASLAuthenticationEnabled(false);

I am confused; who can tell me which is right or the differences between SASL and SASL PLAIN?

Was it helpful?

Solution

SASL is a framework and protocol for authentication that meant to be embedded into other protocols so that the libraries can be re-used.

SASL PLAIN is a specific authentication mechanism that you can use over SASL.

There are a bunch of other SASL mechanisms defined with various degree of support throughout protocols, servers and clients. The main ones in use in XMPP is PLAIN, DIGEST-MD5 (mandatory in the old XMPP RFC) and SCRAM-SHA-1 (mandatory in the new XMPP RFC).

Anyways, to answer your question:

If you disable SASL, then Smack will probably use what's called legacy authentication. This might appear to fix things if you don't encrypt your connection with TLS, as many servers don't allow PLAIN over unencrypted connections.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top