简体   繁体   中英

Ldap authentication java play

I am developing aN application using play framework. I need to use LDAP for user authentication. My client is given me a master user who has privileged to do the ldap query.

  • I am done with first step (do the ldap query) and also getting list of results.
  • Also filtering for a specific user is also done using below

     NamingEnumeration results = context.search("ou=people,ou=internal,o=Compay,c=Country", "uid=TestUser", constraints); 

My question is how can I authenticate the second user via the master user? The TestUser .

Actually it depends which middle ware are you using to connect with LDAP. Like I was using APACHEDS API for communicating with LDAP. It provides me a method "BIND" which takes username and password. I performed authentication using bind if bind is success user authenticated else not.

There are some other implementation as well which provide their own mechanism. You need to check the middle ware you are using.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM