<< Creating a custom authentication with Acegi/Spring Security - Stack Overflow | 首页 | iPhone5和IOS6对HTML5的新增支持_博看文思-HTML5_百度空间 >>

using my own FORM_LOGIN_FILTER

<http auto-config="false" entry-point-ref="loginUrlAuthenticationEntryPoint">
		<custom-filter position="FORM_LOGIN_FILTER" ref="myAuthenticationFilter" />

</http>

	<beans:bean id="myAuthenticationFilter" class="MyAuthenticationFilter">
		<beans:property name="authenticationManager" ref="authenticationManager"/>
		<beans:property name="authenticationFailureHandler" ref="failureHandler"/>
 		<beans:property name="authenticationSuccessHandler" ref="successHandler"/>
	</beans:bean>

	<beans:bean id="successHandler" class="org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler">
 		<beans:property name="defaultTargetUrl" value="/login.spring"/>
	</beans:bean>

	<beans:bean id="failureHandler" class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler">
 		<beans:property name="defaultFailureUrl" value="/login.spring?login_error=1"/>
	</beans:bean>

	<beans:bean id="loginUrlAuthenticationEntryPoint" class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint">
 		<beans:property name="loginFormUrl" value="/login.spring"/>
	</beans:bean>

阅读全文……




发表评论 发送引用通报