Just like 12306 log in on the computer, the phone is out of this situation is how to achieve?

Source: Internet
Author: User
Tags exit in
Use database control, save user state ID, implementation can only be logged on one machine

I'm here single sign-on means to log in one place, other systems will no longer have to log in

Just like 12306 logged in on the computer, the phone is out of this situation.

Reply content:

Use database control, save user state ID, implementation can only be logged on one machine

I'm here single sign-on means to log in one place, other systems will no longer have to log in

Just like 12306 logged in on the computer, the phone is out of this situation.

Thank you for inviting me. The only login limit, the user each login is set to generate a unique ID or token best time to limit, always keep the latest effective.

The login operation generates a login token to be saved in the database and the old token data is deleted so that there is only one client login account. Invalid login token let it out.

According to SESSION_ID, record the latest session_id, the old invalid

The idea is to exit in real time with unique login restrictions, as well as message push implementations. I do, I will put the pro card in the Memcache to save a copy, the local site to save a copy, in the new location to update the memcache above the token, detect whether the site local token and memcache inside the same, inconsistent is the old login point, and then kicked apart on it.

You didn't ask.
You want the PC to log on to the phone and quit when the phone logs on to the PC. Or a PC login when the phone end of the next operation when the exit, mobile phone, then the PC end of the next session when the exit. The two are active one is passive, if the initiative so upstairs answer can be. If it is passive:
Mobile phone can be set up sevice for back-office service
The PC side can communicate with the socket. Or Ajax timed requests to complete

  • Related Article

    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.