spring-projects / spring-ldap

Spring LDAP
https://spring.io/spring-ldap
Apache License 2.0
342 stars 481 forks source link

LDAP-163: Improved Tiger integration #197

Closed spring-projects-issues closed 13 years ago

spring-projects-issues commented 15 years ago

["Mathieu Larchet":https://jira.spring.io/secure/ViewProfile.jspa?name=mlarchet](Migrated from ["LDAP-163":https://jira.spring.io/browse/LDAP-163?redirect=false]) said:

Tiger (Java 5) support is really poor in Spring LDAP. SimpleLdapTemplate doesn't even extends LdapTemplate, missing methods (AttributesMapper) can't be called.

Here are 3 classes designed for Java 5 :

spring-projects-issues commented 15 years ago

["Mattias Hellborg Arthursson":https://jira.spring.io/secure/ViewProfile.jspa?name=marthursson] said:

The @AttributesMapper@ methods are excluded on purpose - we normally discourage usage of @AttributesMapper@ since there is typically no reason for using that rather than the @ContextMapper@.

For the occasion where you need more control and want to access the more generic methods in @LdapTemplate@, these are accessible using @SimpleLdapTemplate#getLdapOperations()@, completely analogous with @SimpleJdbcTemplate@ and @JdbcTemplate@

spring-projects-issues commented 15 years ago

["Mathieu Larchet":https://jira.spring.io/secure/ViewProfile.jspa?name=mlarchet] said:

There's still one method missing from SimpleLdapTemplate : getContextSource.

This method is needed by the new way to authenticate a user : ldapTemplate.getContextSource().getContext(dn, password);

spring-projects-issues commented 15 years ago

["Mathieu Larchet":https://jira.spring.io/secure/ViewProfile.jspa?name=mlarchet] said:

Sorry, I realize I've been quite rude with my suggestion coming from nowhere. I've been using Spring-LDAP for quite a while now and I've 3 more suggestions to improve it :

Thanks for your answer (maybe JIRA isn't the best place for this kind of discussion).

spring-projects-issues commented 15 years ago

["Mattias Hellborg Arthursson":https://jira.spring.io/secure/ViewProfile.jspa?name=marthursson] said:

I distinctly dislike the @getContextSource@ method. It's a complete hack; it is not the intended responsibility of @LdapTemplate@ to provide @ContextSource@ instanaces. You should inject the @ContextSource@ to your class instead. However, in the upcoming 1.3.0 release @LdapTemplate@ and @SimpleLdapTemplate@ will have @authenticate@ methods to use for this purpose. It's in subversion if you want to look at it: https://src.springframework.org/svn/spring-ldap/trunk/core/src/main/java/org/springframework/ldap/core/LdapTemplate.java https://src.springframework.org/svn/spring-ldap/trunk/core-tiger/src/main/java/org/springframework/ldap/core/simple/SimpleLdapTemplate.java

We're hoping to release 1.3.0 final within a week or so.