How to get client IP in preauthentication stage

Hello

I am using openfire 3.6.4 and I have overriden LDAPAuthProvider class to use our authentication API now I want client IP in this api, when I tried to get it from SessionManager I did not get any session, as user is not authenitcated yet I can not get user’s session in SessionManager’s session list but the same time I can see user’s session is present in preauthenticated sessions list. In my authenticatoin api I have username of authenticating user, if I can get the resource name used by the username for preauthentication I can get the Session for this user using getSession(JID) (which takes JID in DOMAIN_NAME/resource_name format so I need resource name used by user) method & hence can get the IP used by the client.