Java Implementation Scan code two-dimensional code login

Source: Internet
Author: User
The implementation of client scan code is divided into the following four steps:
Web page generation QR code
The generated QR code must contain a data that uniquely identifies the user to ensure that the client (mobile phone) is bound to the Web page to prevent others from logging into your account. Here you can generate a random GUID as a unique identifier.
To generate a QR code, you can use the jquery QRCode plugin.
Client scan QR Code
The client needs to verify that the account is logged in before scanning the QR code, and if it is not logged in, you need to prompt the user to log in first. If you are already logged in, you should read the unique identifier GUID after scanning the QR code and send SessionID to the backend server (for example, Java).
Proactively inform Web page login success with Goeasy server
When a request is received by a background server, the SessionID is proactively pushed to a Web page with the same unique identity through Goeasy.
Goeasy background real-time push to the web
Web browser settings related cookie information for login
The Web browser receives a message that includes login-related SessionID, and the browser can add cookies to the browser via JavaScript code, which is the browser that completes the login.

Java Implementation Scan code two-dimensional code login

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.