|
@@ -4328,28 +4328,31 @@ $CATALINA_HOME/bin/startup.sh</programlisting></para>
|
|
|
<para>
|
|
|
A typical configuration, using some of the beans we've discussed above, might look like this:
|
|
|
<programlisting>
|
|
|
- <bean id="initialDirContextFactory" class="org.acegisecurity.providers.ldap.DefaultInitialDirContextFactory">
|
|
|
+ <bean id="initialDirContextFactory"
|
|
|
+ class="org.acegisecurity.providers.ldap.DefaultInitialDirContextFactory">
|
|
|
<constructor-arg value="ldap://monkeymachine:389/dc=acegisecurity,dc=org"/>
|
|
|
<property name="managerDn"><value>cn=manager,dc=acegisecurity,dc=org</value></property>
|
|
|
<property name="managerPassword"><value>password</value></property>
|
|
|
</bean>
|
|
|
|
|
|
- <bean
|
|
|
- id="userSearch"
|
|
|
- class="org.acegisecurity.providers.ldap.search.FilterBasedLdapUserSearch">
|
|
|
+ <bean id="userSearch"
|
|
|
+ class="org.acegisecurity.providers.ldap.search.FilterBasedLdapUserSearch">
|
|
|
+ <constructor-arg index="0">
|
|
|
+ <value></value>
|
|
|
+ </constructor-arg>
|
|
|
+ <constructor-arg index="1">
|
|
|
+ <value>(uid={0})</value>
|
|
|
+ </constructor-arg>
|
|
|
+ <constructor-arg index="2">
|
|
|
+ <ref local="initialDirContextFactory" />
|
|
|
+ </constructor-arg>
|
|
|
<property name="searchSubtree">
|
|
|
<value>true</value>
|
|
|
- </property>
|
|
|
- <property name="initialDirContextFactory">
|
|
|
- <ref local="initialDirContextFactory" />
|
|
|
- </property>
|
|
|
- <property name="searchFilter">
|
|
|
- <value>(uid={0})</value>
|
|
|
- </property>
|
|
|
+ </property>
|
|
|
</bean>
|
|
|
|
|
|
- <bean
|
|
|
- id="ldapAuthProvider" class="org.acegisecurity.providers.ldap.LdapAuthenticationProvider">
|
|
|
+ <bean id="ldapAuthProvider"
|
|
|
+ class="org.acegisecurity.providers.ldap.LdapAuthenticationProvider">
|
|
|
<constructor-arg>
|
|
|
<bean class="org.acegisecurity.providers.ldap.authenticator.BindAuthenticator">
|
|
|
<constructor-arg><ref local="initialDirContextFactory"/></constructor-arg>
|