Spring Security 2 userdetail in one session -


I'm doing a web project, one of the requirements is able to login to 2 different user accounts in one browser. For example, if I have www.myproject.com/member logged in and I open a new tab and I log in them then this time in admin www.myproject.com/admin if I have some of my user functions I try to use www.myproject.com/member/user-detail, I get the access denied response. I understand why spring protection saves 1 user information at a time. Edit:

EDIT:

EDIT:

I was able to log on to many browser tabs I want to be, as long as logged-in users have different roles.

The single behavior you see is common for a site that uses a cookie Contains stored security in the cookie in the token. This spring security cookie is due to the domain name and the collection of login paths (like www.myproject.com/login ).

To see the cookies of Chrome debugger or firebug application, use it.

Most web applications behave like this, for example, not up to Gmail, unless it was before, it had the exact same behavior: entering a tab would be logged out separately. Is the user on a different tab?

It was recently changed to Gmail, which means that they store a security token in no cookie, such as spring security, it is unlikely that they expose a security token in JavaScript, It should still be HTTP only in the cookie. In each request, a request title is filled in, which keeps the user in mind.

It is possible that web applications have different logins per tab, but spring protection does not currently support it outside of the box. For some ideas of implementing it, see it.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -