Subject: SSO with agsXMPP
Hi,
I am using an openfire server configured to use user accounts from windows active directory using LDAP. What I would like to do is to create a client with single sign-on functionality. The only other client I found that has it is Spark (SSO via GSSAPI) and it works quite fine. With this setting checked user doesn't need to enter password and his windows account is used to log on to server. Is it be possible to do this with agsXMPP? If it is, I realy am not sure where to start. So far after making some searches I tried to create XmppClientConnection.OnSaslStart handler:
frosty
I am using an openfire server configured to use user accounts from windows active directory using LDAP. What I would like to do is to create a client with single sign-on functionality. The only other client I found that has it is Spark (SSO via GSSAPI) and it works quite fine. With this setting checked user doesn't need to enter password and his windows account is used to log on to server. Is it be possible to do this with agsXMPP? If it is, I realy am not sure where to start. So far after making some searches I tried to create XmppClientConnection.OnSaslStart handler:
void xmppConn_OnSaslStart(object sender, SaslEventArgs args)
{
args.Auto = false;
args.Mechanism = agsXMPP.protocol.sasl.Mechanism.GetMechanismName(agsXMPP.protocol.sasl.MechanismType.GSSAPI);
}
But this code generates System.NullReferenceException on line 133 in SaslHandler.cs. That is the line with "m_Mechanism.Username = m_XmppClient.Username;":{
args.Auto = false;
args.Mechanism = agsXMPP.protocol.sasl.Mechanism.GetMechanismName(agsXMPP.protocol.sasl.MechanismType.GSSAPI);
}
if (args.Mechanism != null)
{
m_Mechanism = Factory.SaslFactory.GetMechanism(args.Mechanism);
// Set properties for the SASL mechanism
m_Mechanism.Username = m_XmppClient.Username;
m_Mechanism.Password = m_XmppClient.Password;
m_Mechanism.Server = m_XmppClient.Server;
// Call Init Method on the mechanism
m_Mechanism.Init(m_XmppClient);
}
Of course in the XmppClientConnection I set the username, server and even password, although I do not want to use it. I quickly ran out of ideas, any help would be greatly appreciated.{
m_Mechanism = Factory.SaslFactory.GetMechanism(args.Mechanism);
// Set properties for the SASL mechanism
m_Mechanism.Username = m_XmppClient.Username;
m_Mechanism.Password = m_XmppClient.Password;
m_Mechanism.Server = m_XmppClient.Server;
// Call Init Method on the mechanism
m_Mechanism.Init(m_XmppClient);
}
frosty