我已经配置了一个开放的LDAP并在其中添加了一些用户,我能够成功登录这些用户,现在,我已经启动了Hyperledger Composer Rest服务器,并且使用composer提供程序环境变量将LDAP配置为通行证策略。 我尚未将电子邮件ID配置为必填字段,但是我只能验证在LDAP配置文件中提供了电子邮件ID的用户。 对于其余的用户,我会得到一个错误500。
{
"error": {
"statusCode": 500,
"message": "email is missing from the user profile"
}
}
如果在此用户帐户中添加电子邮件ID字段,我将能够成功登录。
我已附加了LDAP中使用的用户个人资料配置。
我正在使用邮递员将请求发布到我的休息服务器,该服务器将我重定向到auth / ldap。 提供的作曲者提供者:
COMPOSER_PROVIDERS='{
"ldap": {
"provider": "ldap",
"authScheme": "ldap",
"module": "passport-ldapauth",
"authPath": "/auth/ldap",
"successRedirect": "http://192.168.255.104:8080/auth/account",
"failureRedirect": "/ldap",
"session": true,
"json": true,
"LdapAttributeForLogin": "cn",
"LdapAttributeForUsername": "cn",
"server": {
"url": "ldap://192.168.255.104:389",
"bindDN": "cn=admin,dc=hsc,dc=com",
"bindCredentials": "hsc321",
"searchBase": "ou=users,dc=hsc,dc=com",
"searchFilter": "(cn={{username}})"
}
}
}'
如果使用通行证身份验证,电子邮件是否为必填字段?