Smack xmpp single sign on sso

Hello,

i want to use the smack api to build a simple xmpp client. i think it’s realy simple, but i dont know how i can use sso (single sign on) to authenticate my users to the openfire server. in my spark client it works perfectly.

can you say me how i can do this?

i start with:

XMPPConnection connection;

SASLAuthentication auth;

public void login(String userName, String password) throws XMPPException

{

ConnectionConfiguration config = new ConnectionConfiguration(“testjabber”,5222, “Work”);

connection = new XMPPConnection(config);

connection.connect();

System.out.println(SASLAuthentication.getRegisterSASLMechanisms());

connection.login(userName,"");

}

I think the Problem is, he dont use the GSSAPI mechanism. He only use the PLAIN method:

[class org.jivesoftware.smack.sasl.SASLGSSAPIMechanism, class org.jivesoftware.smack.sasl.SASLDigestMD5Mechanism, class org.jivesoftware.smack.sasl.SASLCramMD5Mechanism, class org.jivesoftware.smack.sasl.SASLPlainMechanism, class org.jivesoftware.smack.sasl.SASLAnonymous]
Exception in thread "main" SASL authentication failed using mechanism PLAIN:      
at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java:325)     
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:395)     
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:349)     
at JabberSmackAPI.login(JabberSmackAPI.java:25)     at JabberSmackAPI.main(JabberSmackAPI.java:70)

thank you!

or did you know a other library (java or .net) which supports sso?