Our company is looking at moving authentication from our web app which is PHP running on Apache in Windows, and would like to authenticate using Active Directory. I have a way to simply pull your username that you're already authenticated with, but I have no experience with actually authenticating.
Reading up it looks like LDAP would be the way to go. My question is as follows:
Is LDAP the best way to authenticate 开发者_开发问答in a PHP web app using Active Directory credentials? Is there a different setup I should go to perhaps using PHP and IIS?
http://www.davidschultz.org/2008/04/10/how-to-authenticate-against-active-directory-using-php/
^ this will show you how to authenticate against AD with PHP.
I don't know that this is better or worse than LDAP, but it seems pretty easy. Though, read through the comments first--it's probably not a good idea to hit AD on each page load but rather store a value somewhere to check against as one of the comments suggests.
精彩评论