1

I am writing a simple prototype Spring MVC 3.2 with Spring Security. My requirements specify that the urls must be of the following structure

http://app-name/{locale}/signin
http://app-name/{locale}/logout
http://app-name/{locale}/account

I have implemented a Filter to set the locale as a request attribute and successfully managed to get everything working, except spring-security login process, where it does redirect to /account on successful login.

I was wondering whether it is possible to define some kind of wrappers for these actions?

<security:intercept-url pattern="/signin" access="permitAll"/>
    <security:form-login login-page="/signin"
                         login-processing-url="/security_check"
                         username-parameter="username"
                         password-parameter="password"
                         authentication-failure-url="/signin"
                         default-target-url="/account"

    />
airlocker
  • 71
  • 1
  • 7

1 Answers1

0

I managed to solve this by writing my own AuthenticationSuccessHandler and LogoutSuccessHandler. See the answer below for more details

how to get redirected to a method at login/logout before target-url called in spring-security, spring mvc

Community
  • 1
  • 1
airlocker
  • 71
  • 1
  • 7