Obtaining resouce ID in authProvider.authenticate()

Hi there,

I am working on a custom auth provider for our company, and as part of the authentication, we retreive an unique user ID that is different from the username that the client uses to login to Jabber with. Ideally I would like to store this ID in the LocalClientSession as a session data item. I am running into issues with looking up the session from session manager in the context of the AuthProvider, i.e, I do not have the right JID to do the lookup with.

The only pieces I have are the username, the xmpp.domain. Since this is pre-authenticated session, I would need the resourceId (aka streamId) but unfortunately I cant figure out where to retreive this piece of information from. The code where I need this is in AuthProvider.authenticate.

The last method session is available in is SASLAuthentication.handle(), and the object is not passed up the stack.

Here’s the callstack for quick reference:

at org.jivesoftware.openfire.auth.NoNameAuthProvider.authenticate(NoNameAuthProvider.java:56)

at org.jivesoftware.openfire.auth.AuthFactory.authenticate(AuthFactory.java:213)

at org.jivesoftware.openfire.net.XMPPCallbackHandler.handle(XMPPCallbackHandler.java:102)

at org.jivesoftware.openfire.sasl.SaslServerPlainImpl.evaluateResponse(SaslServerPlainImpl.java:120)

at org.jivesoftware.openfire.net.SASLAuthentication.handle(SASLAuthentication.java:305)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:173)

at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:181)

Any help will be appreciated.

Thanks,

Shawn