且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Ldap进行worklight服务器身份验证

更新时间:2023-11-04 13:40:58

第一点:我认为LDAP类型ApacheDS 2.0.0不正确。

支持的类型是:

First point: I think that the LDAP type "ApacheDS 2.0.0" is not correct.
The supported types are:


  1. Microsoft Active Directory

  2. 自定义

  3. IBM Lotus Domino Novell eDirectory

  4. IBM Tivoli Directory Server

  5. Sun Java System Directory Server

  6. Netscape Directory Server

  7. IBM SecureWay Directory Server

  1. Microsoft Active Directory
  2. Custom
  3. IBM Lotus Domino Novell eDirectory
  4. IBM Tivoli Directory Server
  5. Sun Java System Directory Server
  6. Netscape Directory Server
  7. IBM SecureWay Directory Server

所以肯定必须使用自定义。

So surely Custom has to be used.

第二点:你必须添加 userIdMap =*:uid

所以请尝试:

Second point: you have to add userIdMap="*:uid".
So try with:

 <ldapRegistry id="ldap" >
  realm="LdapRegistry" 
  host="localhost" 
  port="10389" 
  ignoreCase="true"
  baseDN="dc=partition1,dc=com"
  bindDN="uid=admin,ou=system"
  userFilter="(&amp;(uid=%v)(objectclass=inetOrgPerson))"
  userIdMap="*:uid"
  bindPassword="secret"
  ldapType="Custom"
 </ldapRegistry>