directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <>
Subject Re: [ApacheDS] How to get client IP address in an interceptor?
Date Thu, 11 Aug 2016 08:43:35 GMT
Le 09/08/16 à 13:13, David Turny a écrit :
> Hi,
> I would like to write an interceptor that do things based on the
> client IP address.
> Unfortunately I couldn't get the client IP.

Something like :

        IoSession ioSession = bindContext.getIoSession();
        SocketAddress address = ioSession.getRemoteAddress();

The thing is that until the Bind operation is completed, we don't have a
CoreSession instance (it's created by the Bind operation), so we can't
feed it with IoSession, so you have to get it directly.

For any other operation, something like :

        SocketAddress address =

will work.

View raw message