Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: How to get mod_ldap authenticated user information in Java |
|
Author |
|
somakd
Joined: 26 May 2016 Posts: 2 Location: Pune, India
|
Posted: Thu 26 May '16 16:32 Post subject: How to get mod_ldap authenticated user information in Java |
|
|
I am trying to setup authentication against a LDAP server and then obtain few more details about the user in a Servlet.
This is my httpd.conf http://apaste.info/e3a
The authentication is successful and I am able to get user email id in request.getRemoteUser(). I need to obtain more information like cn, dept which I have mentioned as AuthLDAPURL attributes. So now, that data should be available in my Servlet as System.getenv("AUTHENTICATE_CN") OR System.getProperty("AUTHENTICATE_CN"), but all I get is NULL.
Am I missing any configuration or do I need to add more modules ? Please help.
Thanks. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Sat 28 May '16 16:36 Post subject: |
|
|
You have to forward it since apache does not share internal variables.
If I remember correctly it was
Code: |
RequestHeader set AUTHENTICATE_CN %{AUTHENTICATE_CN}e
|
|
|
Back to top |
|
|
|
|
|
|