Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
Prateek Bhardwaj #1
Member since Jun 2012 · 3 posts · Location: Bangalore
Group memberships: Members
Show profile · Link to this post
Subject: User authentication inside a web application
Hi,
I am working on a web based contact book. I have managed to integrate it with the Spark chat client but authentication is a problem here. How do i authenticate the chat client as soon as the user logs into the contact book? Right now i have to log into the client separately.

                xmpp.Username = "username";
                xmpp.Password = "secret";

This is what i am using now. Is it possible to pick it up from the cookies as the user logs into the web application/

Thanks in advance
Prateek
Avatar
Alex #2
Member since Feb 2003 · 4295 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
sorry but I don't understand your question. And I think its more related to general web programming than to XMPP.
To create a XMPP session you have to authenticate. So you have to pass the credentials to XmppClientConnection.

Alex
Avatar
Prateek Bhardwaj #3
Member since Jun 2012 · 3 posts · Location: Bangalore
Group memberships: Members
Show profile · Link to this post
Maybe i was not clear in stating my requirement and the challenge .... let me take a shot at it again

Short background
We are a windows shop, we use the OpenFire chat server and the spark IM client from Ignite for our team's internal chat infrastructure. We have created a web based chat interfaceusing the agsXMPP SDK created by you [Great job by the way and keep more coming....]

Our requirement
Some of our users cannot install the spark IM client due to project restrictions, hence we need to give them a web based interface for sending messages to other users. We have an intranet application that these users have access to using NTLM, it is from within this application that we want them to be able to send chat messages. The challenge now is that the users have to key in the user name and the password for each message that they send. We cannot store usernames and passwords due to security policies. Hence the need to be able to login automatically using something like kerberos, NTLM, GSSAPI, SSO etc...

How can we modify our application so that we use NTLM? Also from the forums we figured that there should be a property called useSSO that we can utilize, however it does not show up in the intellisense in VS2008 ....


Will appreciate any guidance in this direction ... thanks
Avatar
Alex #4
Member since Feb 2003 · 4295 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
NTLM is not supported by agsXMPP, but GSSAPI (Kerberos) is. So I think the best would be to configure your Openfire server and Spark clients for GSSAPI. You have to download the latest binary of agsXMPP for GSSAPI or build it yourself from the latest SVN sources.

Alex
Avatar
Prateek Bhardwaj #5
Member since Jun 2012 · 3 posts · Location: Bangalore
Group memberships: Members
Show profile · Link to this post
We have downloaded the latest binaries from here -  http://www.ag-software.net/agsxmpp-sdk/download/

Our IT team has configured GSSAPI support. Now how do we go about modifying our sample to use GSSAPI and perform an auto-login?

Here is the code snippet from our sample

                xmpp = (XmppClientConnection)Application["xmpp"];
                xmpp = new XmppClientConnection();
                Application["xmpp"] = xmpp;
                xmpp.OnLogin += new ObjectHandler(xmpp_OnLogin);
                xmpp.AutoPresence = true;
                xmpp.AutoResolveConnectServer = true;
                xmpp.Port = 5222;
                xmpp.UseSSL = false;
                xmpp.Server = "chat";
                xmpp.Username = Request["tbUsername"];
                xmpp.Password = Request["tbPassword"];
                xmpp.Open();


Appreciate your quick revert, thanks!!!
Avatar
Alex #6
Member since Feb 2003 · 4295 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Sorry, but What I suggested before will not work. The problem is that the xmpp library is running on the webserver in IIS, and not on the users machine you want to login. So it cannot authenticate your users over NTLM or GSSAPI. I currently see no quick solution for this problem.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS