powered by Jive Software

Obtain someones roster with jid only (no password required), possible?

Hello all,

I have a need to display a persons roster on a webpage.

The person is already authenticated into the web-app which is on an intranet.


store the users credentials in the session (username, user full name),

but not the password as the authentication on this web-app is done

using NTLM. (In other words, no login required).

I want to display this users roster without them having to provide a password…so connection.login(username) is what I need.

The smack api does not have this method…connection.login(username,password) or connection.loginAnonymously() is what I found.

Any ideas as to how to accomplish this?

IF this is not possible then is there a way to display the status of all users currently logged into openfire similar to how the admin site (9090) does it?

This would be another viable alternative.


Accessing someone’s roster without providing the password is not possible through XMPP/Smack. If it would be possible everybody would be able to see who your friends are which is probably not what you want.

One solution for your requirement is to write an Openfire plugin that exposes the roster through some remoting protocol (XML-RPC/SOAP/…) and protect it by a technical user that is only known by your webapp.

Another solution is to use the User Status Plugin which saves the status of each user and his presence information to the Openfire database. Then your webapp could access the Openfire database and retrieve the data. This is what some people are doing with scripting languages like PHP at least.

Thanks Stefan.

I did look at the plugin and that just may work, although I was thinking about storing the status in memory rather than in the database as I only anticipate < 100 users.

I also looked at the admin console --> roster page and it seems that that jsp exposes a users roster…is that a plugin or part of the openfire build?



The roster page is part of the Openfire build.


I noticed that your plugin only works with mysql, do you anticipate your user-status plugin would eventually support the integrated database?

What packages are required to build my own plugin?




What account does an openfire plugin operate under?

Message was edited by: gforty