File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
EJB and other Java EE Technologies
Webapp and LDAP authentication
Joined: Oct 28, 2007
Apr 24, 2008 03:52:00
I'm trying to authenticate user and password in a form of my web application on LDAP server.
For do this, I wrote:
,String> env = new Hashtable<String,String>(4);
env.put(Context.SECURITY_PRINCIPAL, userid);// User
env.put(Context.SECURITY_CREDENTIALS, password);// Password
log.info("User " + userid + " authenticated in LDAP mode");
} catch (
log.error("User " + userid + " authentication failed");
It works... BUT only for a few users! For others, existent and with valid password, the code throws an exception!
Access to Context is the same thing to verify password correctness? If they are different, I need another piece of code for the second thing?
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: Webapp and LDAP authentication
LDAP Active Direcory user attrbinutes
Using the Singleton pattern
Connecting to Active Directory using LDAP
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014