You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Yii2使用Yii2LdapAuth包实现LDAP认证时绑定失败求助

Yii2 LDAP认证绑定失败问题求助

我在Yii2框架中安装了\stmswitcher\Yii2LdapAuth\LdapAuth包,用于通过LDAP完成用户认证,以下是我的LDAP配置信息:

'ldapAuth' => [
    'class' => '\stmswitcher\Yii2LdapAuth\LdapAuth',
    'host' => 'ldap.forumsys.com',
    'baseDn' => 'dc=example,dc=com',
    'searchUserName' => 'riemann',
    'searchUserPassword' => 'password',

   // optional parameters and their default values
    'ldapVersion' => 3,             // LDAP version
    'protocol' => 'ldap://',       // Protocol to use
    'followReferrals' => false,     // If connector should follow referrals
    'port' => 389,                  // Port to connect to
    'loginAttribute' => 'uid',      // Identifying user attribute to look up for
    'ldapObjectClass' => 'person',  // Class of user objects to look up for
    'timeout' => 10,                // Operation timeout, seconds
    'connectTimeout' => 5,          // Connect timeout, seconds 
]

使用上述配置可以连接到LDAP服务器,但无法完成LDAP绑定操作,遇到如下错误:

错误截图

请问我哪里配置有误?能否提供帮助?


内容的提问来源于stack exchange,提问作者Nirali Kavar

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.29 19:32:32