Hi,
I am trying to do LDAP authentication, but the password attribute in LDAP is "userPassword".
How do I configure this in spring security?
I was trying to provide a UserDetailMapper as in the following codes, but then I realized that the setUserDetailsMapper is removed from AbstractLDAPAuthenticator, which BindAuthenticator inheres.
Many thanks in advance,
Yee
---------------------------------------------------------------------------------
Code:<beans:bean id="userDetailsMapper" class="org.springframework.security.userdetails.ldap.LdapUserDetailsMapper"> <beans:property name="passwordAttributeName"> <beans:value>userPassword</beans:value> </beans:property> </beans:bean> <beans:bean id="bindAuthenticator" class="org.springframework.security.providers.ldap.authenticator.BindAuthenticator"> <beans:constructor-arg ref="myLdapServer" /> <beans:property name="userDnPatterns"> <beans:list> <beans:value>cn={0},o=SSM</beans:value> </beans:list> </beans:property> <beans:property name="userDetailsMapper" ref="userDetailsMapper" /> </beans:bean> <beans:bean id="adminLdapAuthProvider" class="org.springframework.security.providers.ldap.LdapAuthenticationProvider"> <custom-authentication-provider /> <beans:constructor-arg ref="bindAuthenticator" /> <beans:constructor-arg> <beans:bean class="mypackage.MyAuthoritiesPopulator" /> </beans:constructor-arg> </beans:bean>


