I am trying to use Spring Security 3.0.2 LDAP authentication for a JSF website. When I use the configuration below in applicationContext-security.xml, I get this exception - org.springframework.beans.factory.BeanCreationException: error creating bean named "org.springframework.security.web.authentication.rememberme. TokenBasedRememberMeServices # 0 ': Bean initialization failed; The nested exception is org.springframework.context.ApplicationContextException: No registration of UserDetailsService.
<authentication-manager>
<ldap-authentication-provider
user-search-filter="(uid={0})" user-search-base="ou=users,ou=system"
group-search-base="ou=groups,ou=system">
</ldap-authentication-provider>
</authentication-manager>
<ldap-server id="ldapServer" url="ldap://localhost:10389"
root="" />
I just experimented and found that adding below does the job.
<ldap-user-service server-ref="ldapServer" user-search-filter="(uid={0})" />
Spring LDAP. , ? , user-search-filter .
PS: Spring LDAP - UserDetailsService, . , , Spring .