First my question: I have a custom UserProvider and I whant to filter the user listing methods using the user that is requesting the list.
To do this I need the username…
String jid = request.getParameter("jid"); //I do NOT have the request
SessionManager man = XMPPServer.getInstance().getSessionManager();
JID id = new JID(jid);
ClientSession session = man.getSession(id);
session.getUsername(); //******
But I do not have the request.
- Does this make sense?
- (ie: user listing is done by the server outside the context of a user request)
- Can it be done?
Now the long version…
I am sure everybody has read this once but, I am actually doing it.
I need to provide access to users of multiple domains, I have all users (of all domains) in a single place and a username scheme.
Internally I am actually using email as a username, so I am developing a UserProvider plugin…
-
Scheme for username: user#userDomain
-
Single actual domain for everybody.
Currently I am going to test the username scheme with the listing methods turned off. This is NOT a bloquer problem if I can change the user Roster externally, ie using a plugin similar to the UserPlugin.