
iutest.conf.ldapTemplateAcegiTestContext.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <import resource="classpath:/conf/apacheDsContext.xml"/> <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location" value="classpath:/conf/ldap.properties" /> </bean> <bean id="contextSource" class="net.sf.ldaptemplate.support.LdapContextSource"> <property name="urls" value="${urls}" /> <property name="authenticationSource"> <bean class="net.sf.ldaptemplate.support.acegi.AcegiAuthenticationSource" /> </property> <property name="authenticatedReadOnly" value="true" /> <property name="dirObjectFactory" value="net.sf.ldaptemplate.support.DefaultDirObjectFactory" /> </bean> <bean id="ldapTemplate" class="net.sf.ldaptemplate.LdapTemplate"> <constructor-arg ref="contextSource" /> </bean> <bean id="initialDirContextFactory" class="org.acegisecurity.providers.ldap.DefaultInitialDirContextFactory"> <constructor-arg value="${urls}/${base}" /> <property name="managerDn" value="${userName}" /> <property name="managerPassword" value="${password}" /> </bean> <bean id="userSearch" class="org.acegisecurity.providers.ldap.search.FilterBasedLdapUserSearch"> <constructor-arg index="0"> <value></value> </constructor-arg> <constructor-arg index="1" value="(&(cn={0})(objectclass=person))" /> <constructor-arg index="2" ref="initialDirContextFactory" /> <property name="searchSubtree" value="true" /> </bean> <bean id="ldapAuthProvider" class="net.sf.ldaptemplate.support.acegi.LdapTemplateLdapAuthenticationProvider"> <constructor-arg> <bean class="org.acegisecurity.providers.ldap.authenticator.BindAuthenticator"> <constructor-arg ref="initialDirContextFactory" /> <property name="userSearch" ref="userSearch" /> </bean> </constructor-arg> <constructor-arg> <bean class="org.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator"> <constructor-arg ref="initialDirContextFactory" /> <constructor-arg value="c=Sweden" /> <property name="groupRoleAttribute" value="ou" /> </bean> </constructor-arg> </bean> </beans>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy