LDAP double authentication - LdapSearchResult and LdapAuthenticationServices

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

LDAP double authentication - LdapSearchResult and LdapAuthenticationServices

twosolution
hi,

when using LDAP to do the authentication
there are 2 part that do the JNDI LDAP connection

AbstractOFBizAuthenticationHandler.java
method = login (...)

_first time_
AbstractOFBizAuthenticationHandler.java
method =  getLdapSearchResult()

when the result from the getLdapSearchResult is not null
the flow it will go to method = login (...)
which will execute this code
loginResult = dispatcher.runSync("userLogin",
UtilMisc.toMap("login.username", username, "login.password", password,
"visitId", visitId, "locale", UtilHttp.getLocale(request)));

and then subsequently will called LoginServices.java
method = userLogin(...)

and then there is this _second times_ of JNDI - LDAP connection
LdapAuthenticationServices.userLogin(ctx, context)


my question is
1. why two parts of JNDI-LDAP connection
2. does this TODO has any reason for this

" TODO: this should be moved to using the NEW Authenticator API "
inside LoginServices.java

---------------------------
i am using this ldap.xml configuration
<Attribute>uid=%u</Attribute>
     <AuthenType>simple</AuthenType>
<AuthenticationHandler>org.ofbiz.ldap.openldap.OFBizLdapAuthenticationHandler</AuthenticationHandler>
     <AutoPartyId>admin</AutoPartyId>
<AutoSecurityGroupId>CATALOGADMIN</AutoSecurityGroupId>
     <BaseDN>dc=example,dc=com</BaseDN>
     <Filter>(objectclass=*)</Filter>
     <Scope>sub</Scope>
     <URL>ldap://localhost:10389</URL>
<UseOFBizLoginWhenLDAPFail>true</UseOFBizLoginWhenLDAPFail>

------------------------------------------------

thank you
regards,
jen sing


Disclaimer : This E-mail is intended only for the use of the individual or entity named above and may contain information that is confidential. If you are not the intended recipients, please immediately notify us by return email and delete it from your system. Any unauthorised dissemination, distribution or copying of this email is strictly prohibited. Thank You.