[JDEV] Verifying Jabber

jabber at msg.net jabber at msg.net
Mon Jun 18 22:53:23 CDT 2001

> i'm looking for a way to allow applications outside of jabber (locally 
> on the user's machine or remotely such as CGI programs on other servers) 
> to verify that a user is logged into a jabber account. i don't have any 
> specifics to give, and basically am clutching at air right now. anything 
> could help. thanks.

You could have a special jabber account for your web server, and after
requesting the user's JID, use Perl's Net::Jabber to add the user to your
special account's roster,  after which your CGI script account would receive
the user's presence information- that would be a way to verify that they are
currently logged in to the account.

While that proves that the user _knows_ a valid JID that is currently logged
in (and willing to let you subscribe to their presence), that does not verify
the JID they gave is the user's actual account...

Perhaps after the user has given you a JID, and you add him to the special
account's roster, you could send a Jabber message with a URL or password that
they need to put in a form and submit to your CGI to continue. That would give
reasonable certainty.

To cut down the startup overhead, you could use mod_perl, with which each
instance of your script could maintain an active client connection to the
jabber server- such persistence is interesting to write for, and you may
want to consult a mod_perl expert.

Kevin Kadow
MSG.Net, Inc.

More information about the JDev mailing list