Just like 12306 logging on to a computer and logging out on a mobile phone, how does this happen?

Source: Internet
Author: User
Tags exit in
Use Database control to save the user status id, so that you can only log on to one machine. here, single sign-on means logging on to one place, other systems do not need to log on again, just as 12306 logs on to the computer and exits on the mobile phone. Use Database control to save the user status id so that you can only log on to one machine.

The single sign-on here means that you can log on to another system in one place.

It's like 12306 logging on to the computer and logging off on the mobile phone.

Reply content:

Use Database control to save the user status id so that you can only log on to one machine.

The single sign-on here means that you can log on to another system in one place.

It's like 12306 logging on to the computer and logging off on the mobile phone.

Thank you for your invitation. Unique logon restriction. you can set a unique id or token every time you log on. it is best to set a time limit so that the token is always up to date.

The login operation generates a login token and saves it to the database and deletes the old Token Data. This ensures that there is only one Client logon account. The logon token is invalid, so it exits.

The latest session_id is recorded based on session_id. the old one is invalid.

The idea is to use the unique logon restriction and message push to exit in real time. If I do this, I will save a copy of the pro card in memcache, a copy of the local website, and update the token on memcache when logging on to a new location, check whether the local token of the website is consistent with that in memcache. if the token is inconsistent with that in memcache, the old logon point is used.

You didn't know
If you want to log out after the pc has been logged on to the mobile phone, the mobile phone will log out as soon as you log on to the pc. In other words, when a user logs on to the pc, the user exits when the next operation is performed on the mobile phone, and the user logs on to the mobile phone, the user exits when the pc performs the next session. Either of them is active or passive. if they are active, they can answer either of them. If it is passive:
Sevice can be created on the mobile phone end for background services
The pc end can communicate with each other through socket. Or ajax timed request to complete

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.