I just found a problem with segmentfault. How does PHP implement the SESSION Sharing Solution for multiple servers? At that time, I only thought about sharing sessions and answered redis and other caches. Later, I suddenly thought about whether the subject's shared session was intended to achieve single-point login. I thought for a long time, and there was always a way to think about it...
segmentfault
I found a problem. How does PHP implement the SESSION Sharing Solution for multiple servers?
At that time, I only wanted to sharesession
Then I answeredredis
Cache.
Then I suddenly thought of sharing the subject.session
If you want to implement Single-point logon, you have to think about it for a long time. There is always a problem that is hard to solve.How to let the server identify which client is accessingWhether the client has accessed other sites.
Ask?
Thank you !!
Reply content:
Just refreshingsegmentfault
I found a problem. How does PHP implement the SESSION Sharing Solution for multiple servers?
At that time, I only wanted to sharesession
Then I answeredredis
Cache.
Then I suddenly thought of sharing the subject.session
If you want to implement Single-point logon, you have to think about it for a long time. There is always a problem that is hard to solve.How to let the server identify which client is accessingWhether the client has accessed other sites.
Ask?
Thank you !!
You can't see this:
For example, taobao and tmall share a set of users.
After logging on to taobao, the user outputs a hidden image request to tmall on the page:
The token can be an encrypted user identity token. After tmall obtains the decryption, it logs on to the corresponding user and generates a cookie with the domain tmall. in the future, when users access tmall, they will be able to automatically identify the problem.
The service needs to identify that this is not what the service should do.
Generally is to use cookie to indicate the login ID of the client, but to consider the problem of cross-origin, specific reference my blog: http://blog.csdn.net/yunnysunny/article/details/7748106