Custom authentication implementation help

Hi,

First of all, thank you for taking the time to read this. I’m new here and discovering Openfire.

I am trying to achieve a custom authentication class that will be chained to a classic plain auth using the HybridAuthProvider. In my custom class, I would like to be able to retrieve the IP address of the connection that initied the authentication process,so I can accept or reject the user.

Unfortunately I have not been able to do that yet because :

  1. The authentication method only receives username and password
  2. The no-yet-authenticated connection is stored in a session whose JID is something like -DOMAIN-/-SID-. If there’s only one at a time it’s OK, but if many users come at the same time, I don’t know how to find the right session - and attached connection.

I can’t use the global “allowed” IP filter because the second auth mechanism must be available to anyone.

Does an experienced Openfire developer knows if a way to retrieve the user IP address in an Auth class is possible, and if so, how ?

Thank you and best regards !