I need to do ldap authentication using a very basic form, using spring. I know that the ldap stuff needs to be configured as
<bean id="initialDirContextFactory"
class="org.acegisecurity.providers.ldap.DefaultInitialDirContextFactory
">
<constructor-arg>
<value>ldap://hostname:389/dc=example,dc=com</value>
</constructor-arg>
</bean>
<bean id="ldapAuthenticationProvider"
class="org.acegisecurity.providers.ldap.LdapAuthenticationProvider">
<constructor-arg>
<bean
class="org.acegisecurity.providers.ldap.authenticator.BindAuthenticator">
<constructor-arg>
<ref bean="initialDirContextFactory"/>
</constructor-arg>
<property name="userDnPatterns">
<list><value>uid={0},ou=people</value></list>
</property>
</bean>
</constructor-arg>
<constructor-arg>
<bean
class="org.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator
">
<constructor-arg>
<ref bean="initialDirContextFactory"/>
</constructor-arg>
<constructor-arg><value>ou=groups</value></constructor-arg>
<property name="groupRoleAttribute">
<value>cn</value>
</property>
<property name="groupSearchFilter">
<value>(|(member={0})(uniqueMember={0}))</value>
</property>
</bean>
</constructor-arg>
</bean>
But I'm new to spring, and I dont understand how to go about end-to-end - like, apart from this, what other configurations I need to add, the controllers etc., and how to link my form to this. I have gone thru a number of spring tutorials and am able to do a simple form validation properly. But I really dont understand how to go about using the above snippet.
Please please give me some clue or point me to some document that helps me accomplish what I want. I've spent too much time on this due to lack of good docs that give end to end explanation for beginners.
- [Acegisecurity-developer] im fed up -- pls help Karthik V