When you do the BIND with ldap you pass some credentials which are used to bind the link to active directory, using this couldn't you use their username/password supplied and then if the bind fails, they were incorrect if it succeeds then they are correct. I've only tried this method a bit however it seems to work fine. In theory you might need to test this initial connection to verify their username/password then create another connection as you would normally as there's the possibility the user doesn't have the correct permissions to perform some actions in your application... e.g.
they enter username password
you verify these by attempting to bind a connection with AD
if the bind succeeds {
close the initial connection
create your usual connection (likely to be with an account which has admin access)
} else {
inform them they didnt enter proper username and password
}
There's probably a more acceptable way of checking their credentials with AD, however this is the easiest way I've found so far and haven't come across any problems yet. Like I say, it's not fully tested.
Cheers
Main Topics
Browse All Topics





by: alexhoganPosted on 2005-03-10 at 08:12:19ID: 13507490
You will need LDAP support in order to accomplish this simply.
ang/php/ar ticle.php/ 3100951
Take a look at this article.
http://www.developer.com/l