View Full Version : Example of authentication via Web
Shaggy
Oct 5th, 2006, 04:43 AM
Hello to everybody,
I am newer with Spring-LDAP and I try to use this "plugin" to validate users via web, but don't know how I can develop a simple authentication via web. In addition, I must say that I have developed an example with spring and JNDI/LdapContext and it runs perfectly.
If I use Spring-LDAP how can I sent user and password to validate?
Thanks and best regards,
Ivan
rasky
Oct 5th, 2006, 12:35 PM
Spring LDAP doesn't include any authentication mechanism as such out of the box. Authentication and authorization is best handled using another Spring Framework sub project, Acegi Security (http://acegisecurity.org).
While it would certainly be possible to implement a simple authentication mechanism using Spring LDAP, generalizing this functionality and suplying it with the library seems quite out of scope of this project as it is all included in Acegi Security.
Nullpointer
Nov 6th, 2006, 05:34 AM
How can I select user by LDAP query?
For example, I want to use:
String password = "secret";
...
template.search("ou=Users", "(&(uid=userid)(userPassword="+password+"))", searchHandler);
and the password in LDAP server is "{CRYPT}password"
rasky
Nov 6th, 2006, 11:31 AM
If you're trying to do authentication using Spring LDAP you might want to have a look at this thread (http://forum.springframework.org/showthread.php?t=29063).
Nullpointer
Nov 7th, 2006, 01:51 AM
Thanx, but I don't want to authentication user. I have connection to LDAP server with root account (so I've access to all users) and I just want to get user with login and password. With
String password = "secret";
...
template.search("ou=Users", "(uid=userid)", searchHandler);
it's OK, but I want to get user with uid and password. My problem is, how to set this password with userPassword attribute. In LDAp server this password is stored like "{CRYPT}password".
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.