开发者

Spring Security, Spring MVC and Login Sessions

I have my Spring MVC & Spring Security up and running as suggested by Spring's own reference application "petclinic". Everything's fine except that the login does not persist a browser restart.

开发者_运维问答

What has to be considered to make sure a logged in user does not need to relogin after browser restart?


On a browser restart, user sessions aren't maintained. So, you login informations doesn't survive a browser restart because they are stored in session.

To set up a login that survives browser restarts, you need to implement a cookie based authentication, also known as "Remember me" in Spring security.

To set up "Remember me" using Spring security, I suggest you the following article. You can also check out Spring documentation on the subject.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜