Authenticating in PHP using LDAP through Active Directory

后端 未结 6 2114
面向向阳花
面向向阳花 2020-11-28 17:24

I\'m looking for a way to authenticate users through LDAP with PHP (with Active Directory being the provider). Ideally, it should be able to run on IIS 7 (adLDAP does it on

6条回答
  •  孤街浪徒
    2020-11-28 17:58

    I do this simply by passing the user credentials to ldap_bind().

    http://php.net/manual/en/function.ldap-bind.php

    If the account can bind to LDAP, it's valid; if it can't, it's not. If all you're doing is authentication (not account management), I don't see the need for a library.

提交回复
热议问题