Hello All,
I am using spring webflow 2.1.0 ,spring 3.0.3 and spring escurity 3.0.2
i try to login and authunticate user against ldap but i always get the following Reason: No AuthenticationProvider found for org.springframework.security.providers.UsernamePas swordAuthenticationToken .Please advice if you face such a problembecause i need to solve this issue urgently as today is deadline of this task.
below is configuration files and all beans is loaded once application started
web.xml
<!-- Enables Spring Security -->
webflow-beans.xmlPHP Code:<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
PHP Code:<!-- Installs a listener to apply Spring Security authorities -->
<bean id="securityFlowExecutionListener"
class="org.springframework.webflow.security.SecurityFlowExecutionListener"/>
webflow-security
PHP Code:<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:security="http://www.springframework.org/schema/security"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.0.xsd">
<security:http auto-config="true">
<security:form-login login-page="/flow/login"
login-processing-url="/flow/loginProcess"
default-target-url="/flow/browseDM"
authentication-failure-url="/flow/login?login_error=1"/>
<security:logout logout-url="/flow/logout"
logout-success-url="/flow/login"/>
</security:http>
</beans>
security-beans.xml
Your help is so appreciatedPHP Code:<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
<!-- $Id: security-beans.xml 450 2010-07-14 19:12:04Z sazzam $ -->
<bean id="authenticationManager"
class="org.springframework.security.authentication.ProviderManager">
<property name="providers">
<list>
<ref local="ldapAuthProvider"/>
</list>
</property>
</bean>
<bean id="contextSource"
class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
<constructor-arg value="ldap://10.10.10.50/DC=itworx,DC=com"/>
<property name="userDn" value="${securityContextSource.userDn}"/>
<property name="password" value="${securityContextSource.password}"/>
</bean>
<bean id="bindAuthenticator" class="org.springframework.security.ldap.authentication.BindAuthenticator">
<constructor-arg ref="contextSource"/>
<property name="userDnPatterns">
<list>
<value>"${filterBasedLdapUserSearch.searchFilter}"</value>
</list>
</property>
</bean>
<bean id="ldapAuthoritiesPopulator"
class="org.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator">
<constructor-arg ref="contextSource"/>
<constructor-arg value="ou=groups"/>
<property name="groupRoleAttribute" value="ou"/>
</bean>
<bean id="ldapAuthProvider"
class="org.springframework.security.ldap.authentication.LdapAuthenticationProvider">
<constructor-arg index="0" ref="bindAuthenticator"/>
<constructor-arg index="1" ref="ldapAuthoritiesPopulator"/>
</bean>
</beans>


because i need to solve this issue urgently as today is deadline of this task.
Reply With Quote