$serverId=0; $ldap_server[$serverId]['server'] = "www.pangxieke.com"; $ldap_server[$serverId]['port'] = "389"; $ldap_server[$serverId]['protoversion'] = "ldapv2"; // 'ldaps' is supported for 'ldapv2' servers // 'start-tls' is supproted for 'ldapv3' servers // 但我这两种配置都没有成功,查看源码后,将ldaps改成其他任何支付就可以了,这里改为false $ldap_server[$serverId]['encrypt'] = "false"; $ldap_server[$serverId]['referrals'] = false; $ldap_server[$serverId]['binddn'] = 'uid=mybinduser,dc=mycompany,dc=org'; $ldap_server[$serverId]['bindpw'] = 'AsecretPassword';
查询设定
1 2 3 4 5 6 7 8 9 10 11 12 13 14
$query_id: is the id of the LDAP query $ldap_queries[$query_id]['ldapServerId']: bind the query to a specific server $ldap_queries[$query_id]['name']: String describing the query. It will be displayed in the GUI $ldap_queries[$query_id]['userbase']: Root DN to useforusersearches $ldap_queries[$query_id]['userfilter']: filterusedtoselectpotentialusers' entries. Itmustbeenclosedinparenthesis $ldap_queries[$query_id]['userscope']: scopeoftheLDAPsearchforusers ('base', 'one' or 'sub') $ldap_queries[$query_id]['firstname_attr']: LdapattributethatwillbemappedtotheFirstnamefieldofthetokenentry $ldap_queries[$query_id]['lastname_attr']: LdapattributethatwillbemappedtotheLastnamefieldofthetokenentry $ldap_queries[$query_id]['email_attr']: Ldapattributethatwillbemappedtotheemailaddressfieldofthetokenentry Optionalyyoucanretrievemoreinformationfromthedirectory: $ldap_queries[$query_id]['token_attr']: Ldapattributethatwillbemappedtothetokencode $ldap_queries[$query_id]['language']: Ldapattributethatwillbemappedtotheuserlanguagecode $ldap_queries[$query_id]['attr1']: Ldapattributethatwillbemappedtotheattribute_1field $ldap_queries[$query_id]['attr2']: Ldapattributethatwillbemappedtotheattribute_2field