Spring security redirections inside and outside of a webflow

时光总嘲笑我的痴心妄想 提交于 2019-12-11 14:37:33

问题


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 ?


回答1:


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.



来源:https://stackoverflow.com/questions/23854332/spring-security-redirections-inside-and-outside-of-a-webflow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!