Search code examples
springspring-mvcspring-securityspring-webflow

Spring security redirections inside and outside of a webflow


I'm using for first time spring security (3.2.0.RELEASE) and spring webflow (2.4.0.RC1).

I have some pages where user can login (through a modal window). This logins should not redirect user, instead modal window should be closed and actual page is refreshed in order to show the name of logged user.

In addition, in my web there is a webflow, in this webflow is where an order is created. As a last view-state the user must be logged in order to save the order. So if user is not logged at this point, I redirect him to a login page. If user logs in successfully, his order should keep "alive" and user should be redirected to finish view-state.

How can I configure (I'm using java config) the security of my site ?


Solution

  • I used another approach. I always redirect to same page when a user is authenticated and I've added a special view-state to control registration if user is not logged.