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:
Any help will be appreciated.