Open vicsoulz opened 5 years ago
YApi对接AD域控用户登录 修改vi ../config.json配置文件如下: "ldapLogin": { "enable": true, "server": "ldap://192.168.1.10", //AD域控服务器 "baseDn": "yapi@test.com", //AD域控用对应给与一个认证用户 "bindPassword": "Test1234", //对应认证用户密码 "searchDn": "OU=技术中心,DC=test,DC=com", //可读取的OU路径 "searchStandard": "&(objectCategory=Person)(sAMAccountName=%s)", //MS AD的用户属性 "emailPostfix": "", //非必须可为空 "emailKey": "", //非必须可为空 "usernameKey": "sAMAccountName" 用户登录密码取值为对应用户属性,原因为AD密码不可逆,只取此值 }
YApi对接AD域控用户登录 修改vi ../config.json配置文件如下: "ldapLogin": { "enable": true, "server": "ldap://192.168.1.10", //AD域控服务器 "baseDn": "yapi@test.com", //AD域控用对应给与一个认证用户 "bindPassword": "Test1234", //对应认证用户密码 "searchDn": "OU=技术中心,DC=test,DC=com", //可读取的OU路径 "searchStandard": "&(objectCategory=Person)(sAMAccountName=%s)", //MS AD的用户属性 "emailPostfix": "", //非必须可为空 "emailKey": "", //非必须可为空 "usernameKey": "sAMAccountName" 用户登录密码取值为对应用户属性,原因为AD密码不可逆,只取此值 }
按照这个配置,报一个错:
TypeError: name (string) required
at Client.bind (/yapi/vendors/node_modules/ldapjs/lib/client/client.js:467:11)
at Promise.then.searchDn (/yapi/vendors/server/utils/ldap.js:98:16)
at new Promise (
能集成AD登录方式吗?