问题
I am trying to use LDAP authentication in Worklight using Apache DS. I have created LDAP registry in server.xml and also edited the auth config xml file. But, still I am not able to authenticate users from my WL client.
Login module:
<className>com.worklight.core.auth.ext.LdapLoginModule</className>
<parameter name="ldapProviderUrl" value="ldap://localhost:10389"/>
<parameter name="ldapTimeoutMs" value="2000"/>
<parameter name="ldapSecurityAuthentication" value="simple"/>
<parameter name="validationType" value="searchPattern"/>
<parameter name="ldapSecurityPrincipalPattern" value="{username}"/>
<parameter name="ldapSearchFilterPattern" value="(&(uid={username})(objectclass=inetOrgPerson)(memberof=CN=Raj,OU=users,OU=system,DC=example,DC=com))"/>
<parameter name="ldapSearchBase" value="dc=example,dc=com"/>
</loginModule>
LDAPregistry :
<className>com.worklight.core.auth.ext.LdapLoginModule</className>
<parameter name="ldapProviderUrl" value="ldap://localhost:10389"/>
<parameter name="ldapTimeoutMs" value="2000"/>
<parameter name="ldapSecurityAuthentication" value="simple"/>
<parameter name="validationType" value="searchPattern"/>
<parameter name="ldapSecurityPrincipalPattern" value="{username}"/>
<parameter name="ldapSearchFilterPattern" value="(&(uid={username})(objectclass=inetOrgPerson)(memberof=CN=Raj,OU=users,OU=system,DC=example,DC=com))"/>
<parameter name="ldapSearchBase" value="dc=example,dc=com"/>
</loginModule>
Even after feeding the correct user password as configured in Apache. Challenge handler is still not doing authentication success for me.
Thanks
回答1:
Worklight provides a tutorial and sample covering "Using LDAP Login Module to authenticate users with LDAP server". I would recommend reading these resources and attempting to get your environment setup with the sample provided first:
Tutorial:
http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v610/08_05_Using_LDAP_Login_Module_to_authenticate_user_with_LDAP_server.pdf
Sample:
http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v610/LDAPLoginModuleProject.zip
来源:https://stackoverflow.com/questions/23287087/worklight-ldap-authentication-using-apacheds