Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <authentication-manager alias="authenticationManager"/>
- <beans:bean id="myFilter" class="test.MyAuthenticationProcessingFilter">
- <custom-filter position="AUTHENTICATION_PROCESSING_FILTER" />
- <beans:property name="defaultTargetUrl" value="/initialize.action"/>
- <beans:property name="authenticationFailureUrl" value="/login_failed.action"/>
- <beans:property name="authenticationManager" ref="authenticationManager"/>
- <beans:property name="alwaysUseDefaultTargetUrl" value="true"/>
- <beans:property name="filterProcessesUrl" value="/perform_login"/>
- </beans:bean>
- <beans:bean id="entryPoint" class="org.springframework.security.ui.webapp.AuthenticationProcessingFilterEntryPoint">
- <beans:property name="loginFormUrl" value="/login.action"/>
- </beans:bean>
- @Override
- public Authentication attemptAuthentication(HttpServletRequest request)
- throws AuthenticationException {
- String param = request.getParameter("_spring_security_remember_me");
- HttpSession session = request.getSession();
- if (session != null || getAllowSessionCreation()) {
- session.setAttribute("_spring_security_remember_me", param);
- }
- return super.attemptAuthentication(request);
- }
- }
- <beans:bean id="myFilter" class="test.MyAuthenticationProcessingFilter">
- <custom-filter position="AUTHENTICATION_PROCESSING_FILTER" />
- ...
- </beans:bean>
- <http entry-point-ref="entryPoint">
- ...
- <!-- no form-login here -->
- </http>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement