Thanks for the patch it works fine for me in case of using DIGEST-MD5 authentication!
Unfortunatelly in our solution we need to connect to facebook via the FB-connect solution or so called X-FACEBOOK-PLATFORM mechanism
(for more info look: http://wiki.developers.facebook.com/index.php/Integrating_with_Facebook_Chat)
So this is a new authentication method and I try to register this auth method like mentioned in the smack documentation with
registerSASLMechanism(String, Class)
supportSASLMechanism(String, int)
But I get a null pointer exception from the Sasl.createSaslClient(mechanisms, null, “xmpp”, hostname, props, this); call in the SASLMechanism.authentication() method, because the X-FACEBOOK-PLATFORM mechanism is not in the “Securtiy Provider” list, like DIGEST-MD5.
Do you have any help why the registration doesnt work or what I can do to get the facebook authentication mechanism to run???
THANKS a lot in advance!
best regards,
Manuel
PS: here are the last lines from the stack trace:
java.lang.NullPointerException
at org.jivesoftware.smack.sasl.SASLMechanism.authenticate(SASLMechanism.java:117)
at communityConnections.MySASLFacebookMechanism.authenticate(MySASLFacebookMechani sm.java:34)
at communityConnections.MySASLFacebookMechanism.authenticate(MySASLFacebookMechani sm.java:45)
at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java: 308)
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:395)
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:349)