Worklight LDAP authentication using ApacheDS

强颜欢笑 提交于 2019-12-11 19:48:51

问题


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="(&amp;(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="(&amp;(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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!