we have issues with CFLDAP also. We are 99% they have to do with the
LDAP server. THe issues are timeout related. I wrote my own LDAP
auth code in Java and tested that instead of CF's CFLDAP and got the
same time out issues. Maybe you will have better luck.
how your LDAP is used will vary, but here is a code snip for
connecting and getting the DN
some vars
securityAuthentication = "simple"
ldapHost=urltoyourldap
username=someuserid <-- depends on your ldap
Properties env = new Properties();
env.put("java.naming.factory.initial",
"com.sun.jndi.ldap.LdapCtxFactory");
env.put("java.naming.provider.url", ldapHost);
env.put("java.naming.security.principal", "");
env.put("java.naming.security.credentials", "");
env.put("java.naming.security.authentication",
securityAuthentication);
try {
DirContext ctx = new InitialDirContext(env);
SearchControls ctls = new SearchControls();
String[] returnAttribute =
{"dn","cn","employeeNumber","uid"};
ctls.setSearchScope(2);
ctls.setReturningAttributes(returnAttribute);
ctls.setCountLimit(2);
NamingEnumeration answer =
ctx.search("ou=people,o=YOURORG",
"(&(objectClass=Person) (uid="+username+"))", ctls);
if (answer.hasMore()) {
SearchResult sr =
(SearchResult)answer.next();
Attributes attrs = sr.getAttributes();
employeeNumber =
(String)attrs.get("employeeNumber").get();
userDn = "employeenumber=" +
employeeNumber + ", ou=people, o=YOURORG";
LoggerService.createDefaultLogger().logWarning(RB.getString(this,
"got the DN", userDn));
}
ctx.close();
} catch (NamingException e) {
throw new LoginException(e.getMessage());
} catch (Exception e ) {
throw new LoginException(e.getMessage());
}
On 11/9/05, Aaron Rouse <[EMAIL PROTECTED]> wrote:
> I would not mind seeing an example of that. We have certainy had our fair
> share of LDAP issues since upgrading to 6.1 from 5.0
>
> On 11/9/05, Douglas Knudsen <[EMAIL PROTECTED]> wrote:
> >
> > workaround? write your LDAP call in Java...a bit of work but not too
> > terribly difficult.
> >
> > DK
> >
> >
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223775
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54