Code scanning login method and device, equipment and storage medium
By generating login access credentials locally on the client and associating them with the device identification, combined with the server's pre-authorization mechanism, the problem of insufficient security for scanning QR code logins on screenless devices is solved, and precise authorization of legitimate devices and timely detection of illegal logins are achieved. Stop, improving the security of user information.
Patent Information
- Application Number
- CN202410824982.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-10-15
AI Technical Summary
The existing code scanning login method has insufficient security on screen-less devices. The QR code contains user credential information and is easily read maliciously, threatening user information security.
The server generates pre-authorized credentials and pre-authorized code images. The client generates login access credentials locally and associates them with the device identification. It only uses the pre-authorized credentials to log in during authorization, ensuring that only legitimate devices can log in, and promptly logs in when illegal logins occur. Stop.
It improves the security of QR code login, ensuring that only legitimate devices can log in using pre-authorized credentials, and enhances the security of user information.
Smart Images

Figure CN118784286A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a code scanning login method, device, equipment and storage medium. Background Art
[0002] With the continuous development of science and technology, more and more applications are being developed. When logging into an application on a terminal (such as a Web terminal), scanning a code to log in is popular because of its convenient and quick operation. The prior art provides a scanning code login method, in which a first device scans a graphic code displayed by a second device, obtains an authorization identifier contained in the graphic code, and sends the authorization identifier to a server. The server determines that the authorization identifier is an authorization identifier assigned by the server, and authorizes the account logged in by the first device to log in to the second device.
[0003] Then, wearable devices such as AR helmets and AR glasses do not have screens to display QR code images to other terminals, so the existing scanning code login method has certain limitations. Moreover, the QR code itself includes information related to user credentials. If it is read maliciously, it may cause the user's login credentials to be leaked, thereby threatening the user's information security. Summary of the invention
[0004] The present invention aims to provide a code scanning login method, device, equipment and storage medium, which provide a secure code scanning login method for screenless devices and improve the security of code scanning login. The technical solution is as follows:
[0005] On the one hand, a secure code scanning login method is provided, the method comprising the following steps:
[0006] The server obtains a pre-authorization request from the first client, generates a pre-authorization credential, generates a pre-authorization code image according to the pre-authorization credential, and returns the pre-authorization credential and the pre-authorization code image to the first client, so that the first client receives and displays the pre-authorization code image;
[0007] The second client obtains the pre-authorization code image received by the first client, generates a login access credential and obtains a device identifier, and sends a pre-login request to the server, wherein the pre-login request includes the login access credential and the device identifier;
[0008] The server obtains the pre-login request from the second client, generates a login credential, and associates the login credential with the pre-authorization credential;
[0009] The server obtains a query login request from the first client, the query login request includes the pre-authorization credential, queries the validity of the pre-authorization credential, and if valid, queries the device identification according to the pre-authorization credential, and returns the device identification to the first client, so that the first client receives and displays the device identification;
[0010] The server obtains the authorization request from the first client and generates a login state digital signature;
[0011] The server obtains a login request from the second client and returns the login state digital signature to the second client.
[0012] Preferably, the server obtains the pre-authorization request from the first client and generates the pre-authorization credential, including: generating the pre-authorization credential according to the source IP address or MAC address of the pre-authorization request.
[0013] Preferably, the server obtains a pre-login request from the second client, generates a login credential, and associates the login credential with the pre-authorization credential, including:
[0014] Obtaining a pre-login request from the second client, wherein the pre-login request includes a login access credential, a pre-authorization credential, and a device identifier;
[0015] Query and determine the validity of the pre-authorization credential;
[0016] If valid, a login credential is generated based on the login access credential and the source IP address or MAC address of the request, and the login credential and the device identifier are associated with the pre-authorization credential.
[0017] Preferably, the server obtains the authorization request from the first client and generates a login state digital signature, including:
[0018] Obtaining an authorization request from the first client, wherein the authorization request includes the pre-authorization credential;
[0019] Querying the validity of the pre-authorization credentials;
[0020] If valid, the login credentials are queried according to the pre-authorization credentials, and a login-state digital signature is generated at the same time, the authorization state of the login credentials is determined to be successfully authorized, and the login-state digital signature is associated with the login credentials.
[0021] Preferably, the server obtains the login request from the second client and returns the login state digital signature to the second client, including:
[0022] Obtaining a login request from the second client, wherein the login request includes the login access credential;
[0023] Obtaining login credentials according to the login access credentials;
[0024] The associated login state digital signature is queried according to the login credentials, and the login state digital signature is returned to the second client.
[0025] On the other hand, a secure code scanning login method is provided, the method is applied to a first client, and the method includes:
[0026] In response to the code display instruction, a pre-authorization request is initiated to the server according to the pre-authorization credential;
[0027] Obtain a pre-authorization code image, the pre-authorization code image including the pre-authorization credential, and store the pre-authorization credential;
[0028] Displaying the pre-authorization code image, so that the second client obtains the pre-authorization code image, parses the pre-authorization code image to obtain the pre-authorization credential, and sends a pre-login request to the server according to the pre-authorization credential;
[0029] Sending a login query request to the server based on the pre-authorization credential to obtain a device identifier associated with the pre-authorization credential;
[0030] Display the device identification so that the user can understand the scanning status of the pre-authorization code;
[0031] An authorization request is sent to the server based on the pre-authorization credential and the second client identifier, so that the server generates a login state digital signature and associates the login state digital signature with the login credential.
[0032] Preferably, the sending a login query request to the server based on the pre-authorization credential to obtain a device identifier associated with the pre-authorization credential includes:
[0033] Sending a query request to the server in a polling manner, wherein the query request includes a pre-authorization credential;
[0034] If the pre-authorization credentials are valid, the device identification returned by the server is obtained.
[0035] On the other hand, a secure code scanning login method is provided, the method is applied to a second client, and the method includes:
[0036] In response to the login instruction, a login access credential is generated and a device identification is obtained, wherein the device identification is not limited to the following information: device name, device type, application name, application version
[0037] Scan the code to obtain the pre-authorization code image displayed by the first client, parse the pre-authorization code image to obtain the pre-authorization credential, and send a pre-login request according to the pre-authorization credential;
[0038] In response to successful pre-login, a login request is sent to obtain a login-state digital signature.
[0039] Preferably, in response to successful pre-login, sending a login request and obtaining a login-state digital signature comprises: sending a login request to a server in a polling manner, wherein the login request comprises login access credentials.
[0040] On the other hand, a secure code scanning login device is provided, the device comprising:
[0041] A pre-authorization request response module, configured to obtain a pre-authorization request from a first client, generate a pre-authorization credential, generate a pre-authorization code image according to the pre-authorization credential, and return the pre-authorization credential and the pre-authorization code image to the first client, so that the first client receives and displays the pre-authorization code image;
[0042] A pre-login request response module, used to obtain a pre-login request, the pre-login request includes a pre-authorization credential, a login access credential, and a device identifier, the server generates a login credential, and associates the login credential and the device identifier with the pre-authorization credential;
[0043] A query login request response module, configured to obtain a query login request from a first client, and return the queried device identifier associated with the pre-authorization credential to the first client;
[0044] The authorization request response module is used to obtain the authorization request from the first client, generate a login state digital signature, and associate the login state digital signature with the device identification.
[0045] A login request response module is used to obtain a login request, the login request includes a login access credential, obtain a login credential through the login access credential, query the associated login state digital signature according to the login credential, and return the login state digital signature to the second client.
[0046] On the other hand, a secure code scanning login device is provided, the device comprising:
[0047] A code display request processing module, used to generate a pre-authorization credential in response to a code display instruction, store the pre-authorization credential, and send a pre-authorization request to a server according to the pre-authorization credential;
[0048] A pre-authorization code image acquisition module, used to acquire a pre-authorization code image, wherein the pre-authorization code image includes the pre-authorization credential;
[0049] A pre-authorization code image display module, used to display the pre-authorization code image so that the second client can obtain the pre-authorization code image;
[0050] A query login processing module, used for sending a query login request to a server according to the pre-authorization credentials, and the server returns a device identification associated with the pre-authorization credentials according to the pre-authorization credentials;
[0051] A query login display module is used to display the device identification, wherein the device identification includes a device name, a device type, an application name and a version thereof, so that a user can observe the second client logged in using the pre-authorization credentials;
[0052] The authorization processing module is used to send an authorization request according to the pre-authorization credentials in response to user authorization, rejection or automatic authorization within 5 seconds.
[0053] On the other hand, a secure code scanning login device is provided, the device comprising:
[0054] A login request code scanning module, used to obtain the first client pre-authorization code image in response to the login instruction, and parse the pre-authorization credentials;
[0055] A pre-login request processing module, used to generate login access credentials, obtain a device identifier, and initiate a pre-login request to a server after obtaining the pre-authorization credentials;
[0056] The login request processing module is used to poll and initiate a login request to the server to obtain the login state digital signature.
[0057] On the other hand, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the secure code scanning login method.
[0058] On the other hand, a secure code scanning login device is provided, the device comprising a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or at least one program being loaded by the processor and executing the secure code scanning login method.
[0059] The present invention provides a secure code scanning login method, which generates login access credentials locally on the second client, and the server binds the login access credentials to the request source address, so that only the client's authorization can use the pre-authorization credentials for login. The present invention displays the device identification of the login credential on the first client, so that the user can accurately authorize the legal device, and the login of the illegal intruder device can also be stopped in time. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 A schematic diagram of a code scanning login system provided in an embodiment of the present application;
[0061] Figure 2 A flowchart of a code scanning login method provided in an embodiment of the present application;
[0062] Figure 3 A flowchart of the server-side pre-authorization service processing provided in the embodiment of the present application;
[0063] Figure 4 A flowchart of the server login query service processing provided in the embodiment of the present application;
[0064] Figure 5 A flowchart of the server authorization service processing provided in the embodiment of the present application;
[0065] Figure 6 A flow chart of the server-side pre-login service processing provided in an embodiment of the present application;
[0066] Figure 7 A flowchart of the server login service processing provided in the embodiment of the present application;
[0067] Figure 8 A flowchart of the code display of the first client provided in an embodiment of the present application;
[0068] Fig. 9 A flowchart showing the identification of the device to be logged in by the first client provided in the embodiment of the present application;
[0069] Fig.10 A flowchart of first client authorization provided in an embodiment of the present application;
[0070] Fig.11 A second client pre-login flow chart provided in an embodiment of the present application;
[0071] Fig.12 A second client login flow chart provided in an embodiment of the present application; DETAILED DESCRIPTION
[0072] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0073] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0074] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0075] Figure 1 is a schematic diagram of the structure of a scanning login system provided in an embodiment of the present application, such as Figure 1 As shown, the system includes a first client 01 , a second client 02 and a server 03 .
[0076] Among them, the server 03 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms. The first client 01 can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart TV, smart watch, etc., but is not limited to this; the second client 02 can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart TV, smart watch, AR helmet, AR glasses, etc., but is not limited to this. The first client 01 and the second client 02 can be directly or indirectly connected to the server 03 by wired or wireless means, and this application does not limit this.
[0077] In the embodiment of the present application, the first client 01 interacts with the server 03 and displays a QR code. The second client 02 interacts with the server 03 by scanning the QR code displayed by the first client 01, thereby authorizing the user account of the first client 01 to the second client 02 for login.
[0078] For example, taking the application as an AR translation application, the AR translation application is installed on both the first client 01 and the second client 02, and the server 03 is a server corresponding to the AR translation application. In addition, the application can also be an instant messaging application, a video playback application, an electronic payment application, etc., and this application does not limit this.
[0079] Figure 2 : is a flowchart of a code scanning login method provided in an embodiment of the present application, the code scanning login method includes:
[0080] In the first step, the first client 01 responds to the code display instruction and sends a pre-authorization request to the server;
[0081] In the second step, after receiving the pre-authorization request sent by the first client, the server generates and stores the pre-authorization credential, generates a pre-authorization code image based on the pre-authorization credential, and then returns the pre-authorization credential and the pre-authorization code image to the first client;
[0082] In the third step, the first client obtains and displays the pre-authorization code image so that the second client can obtain the pre-authorization code image;
[0083] In the fourth step, the second client responds to the login instruction, obtains the pre-authorization code image displayed by the first client, parses it to obtain the pre-authorization credentials, and at the same time, the second client generates login access credentials and obtains the device identification (device name, device type, application name, application version), and then sends a pre-login request to the server; the pre-login request includes the login access credentials, pre-authorization credentials and device identification;
[0084] In step 5, the server obtains the pre-login request of the second client, generates login credentials through the login access credentials, and associates the login credentials and the device identifier with the pre-authorization credentials;
[0085] In the sixth step, the first client sends a pre-login query request to the server by polling, obtains the device identifier associated with the pre-authorization credential and displays it for the user to view and confirm;
[0086] Step 7: The first client sends an authorization request in response to the user authorization instruction, where the authorization request includes a pre-authorization credential and a device identifier;
[0087] In step 8, the server receives the authorization request from the first client, generates a login digital signature, and associates the login digital signature with the login credential;
[0088] In the ninth step, the second client sends a login request to the server through polling. The login request contains login access credentials so that the server can obtain the login credentials through the login access credentials, and then obtain the login state digital signature through the login credentials and return it to the second client. The second client completes the login.
[0089] In the above process, the first client application needs to display a QR code image, and the QR code image includes a pre-authorization credential, which is the basis for obtaining a login state digital signature. The second client scans the QR code image, obtains the pre-authorization credential, and then performs pre-login. The first client application can query the list of second clients that use the pre-authorization credential for pre-login, and can select a legitimate one to send an authorization login request to the application server, and the application server can generate a login state digital signature.
[0090] Optionally, the pre-authorization credential list of the first client only has one second client, and the second client can automatically initiate an authorized login request.
[0091] In the embodiment of the present application, the pre-authorization credential generated by the server is time-limited and valid for 30 seconds. For subsequent requests, the server will return that the pre-authorization credential has timed out and is invalid.
[0092] In the embodiment of the present application, the server will associate the login credentials with the pre-authorization credentials, and only allow association once at most. Multiple associations will cause the pre-authorization credentials to be invalid for multiple associations. For subsequent requests, the server will return that the pre-authorization credentials are invalid for multiple associations. Therefore, if the QR code image is leaked, an illegal client will log in with the pre-authorization credentials, which will cause the pre-authorization credentials to be invalid.
[0093] Figure 3 is a flow chart of the server-side pre-authorization service processing provided by the embodiment of the present application, which is applied to the server, such as Figure 3 As shown, the method includes:
[0094] Obtaining a pre-authorization request from a first client;
[0095] Generate and store pre-authorization credentials; and generate a pre-authorization code image based on the pre-authorization credentials;
[0096] The pre-authorization credential and pre-authorization code image are returned to the first client.
[0097] Figure 4 This is a flow chart of the server login query service processing provided by the embodiment of the present application, which is applied to the server, such as Figure 4 As shown, the method includes:
[0098] Obtaining a login query request from a first client, wherein the login query request includes a pre-authorization credential;
[0099] The server determines whether the pre-authorization credentials are valid;
[0100] If it is valid, query the device identification associated with the pre-authorization credential, and return the device identification to the first client, so that the first client can display the device information to be logged in;
[0101] If it is invalid, the pre-authorization credentials invalid status code is returned so that the process can be reinitiated.
[0102] Figure 5 is a flow chart of the server authorization service processing provided by the embodiment of the present application, which is applied to the server, such as Figure 5 As shown, the method includes:
[0103] Obtaining an authorization request from the first client, where the authorization request includes a pre-authorization credential;
[0104] The server determines whether the pre-authorization credentials are valid;
[0105] If it is valid, the associated login credentials are queried based on the pre-authorization credentials, and then a login-state digital signature is generated and associated with the login credentials;
[0106] If it is invalid, the pre-authorization credentials invalid status code is returned so that the process can be reinitiated.
[0107] Figure 6 is a flow chart of the server-side pre-login service processing provided by the embodiment of the present application, which is applied to the server, such as Figure 6 As shown, the method includes:
[0108] Obtaining a pre-login request from the second client, the pre-login request including a login access credential, a pre-authorization credential, and a device identifier;
[0109] The server determines whether the pre-authorization credentials are valid. If the pre-authorization credentials are invalid, the server will directly return the invalid pre-authorization credentials.
[0110] If the pre-authorization credentials are valid, determine whether the pre-authorization credentials have been associated. If they have been associated, set the pre-authorization credentials to be invalid and return directly;
[0111] If the pre-authorization credentials are not associated, a login credential is generated based on the login access credential, and the login credential is associated with the pre-authorization credential;
[0112] Returns the second client's pre-login success status.
[0113] Figure 7 This is a flow chart of the server login service processing provided by the embodiment of the present application, which is applied to the server, such as Figure 7 As shown, the method includes:
[0114] Obtaining a login request from a second client, wherein the login request includes a login access credential;
[0115] Obtain the login credentials based on the login access credentials, and then query the login state digital signature;
[0116] Return the logged-in digital signature to the second client.
[0117] Figure 8 The bright code flow chart of the first client provided in the embodiment of the present application is applied to the first client, such as Figure 8 As shown, the method includes:
[0118] In response to the authorization code display instruction, a pre-authorization request is sent to the server;
[0119] Get the pre-authorization credentials and pre-authorization code image returned by the server;
[0120] Display the pre-authorization code image.
[0121] Fig. 9 The flowchart of the first client displaying the identification of the device to be logged in provided in the embodiment of the present application is applied to the first client, such as Fig. 9 As shown, the method includes:
[0122] In response to successful pre-authorization, sending a login query request to the server in a polling manner, wherein the login query request includes the pre-authorization credentials;
[0123] Get the server response;
[0124] The pre-authorization credentials are invalid, exit polling;
[0125] The pre-authorization credentials are valid and the device ID to be logged in is displayed.
[0126] In an embodiment of the present application, the first client initiates a query request to the server in a polling manner every 3 seconds. Optionally, a long connection can be established with the server, and the server actively pushes the identification of the device to be logged in to the first client.
[0127] Fig.10 The first client authorization flow chart provided in the embodiment of the present application is applied to the first client, such as Fig.10 As shown, the method includes:
[0128] In response to the authorization instruction, sending an authorization request to the server, the authorization request including the pre-authorization credentials;
[0129] Get the server response. If the pre-authorization credentials are invalid, return directly.
[0130] Authorization is successful, and the success text is displayed and returned.
[0131] In the embodiment of the present application, if the user does not perform any operation authorization or refuses authorization within 5 seconds of the displayed device identification to be logged in, the application will initiate automatic authorization with the default authorization after 5 seconds.
[0132] Fig.11 The second client pre-login flow chart provided in the embodiment of the present application is applied to the second client, such as Fig.11 As shown, the method includes:
[0133] In response to the login instruction, the second client obtains the pre-authorization code image displayed by the first client by scanning the code, and parses it to obtain the pre-authorization credential;
[0134] Generate login access credentials and obtain device identification;
[0135] Carrying data pre-authorization credentials, login access credentials and device identification, initiate a pre-login request to the server;
[0136] Get a response, the pre-authorization credentials are invalid, and the process ends;
[0137] The pre-authorization credentials are valid, the pre-login is successful, and the login request is initiated.
[0138] In an embodiment of the present application, the device identification includes a device name, a device type, an application name, and an application version, which is used by the second client to display the device to be logged in.
[0139] Fig.12 The second client login flow chart provided in the embodiment of the present application is applied to the second client, such as Fig.12 As shown, the method includes:
[0140] In response to the pre-login being successful, sending a login request to the server in a polling manner, wherein the login request includes a login access credential;
[0141] Get the server response. If the first client is not authorized, perform a polling query.
[0142] If the first client has been authorized, the login is successful;
[0143] Others, login failed.
[0144] In an embodiment of the present application, the second client initiates a login request to the server in a polling manner every 3 seconds. Optionally, a long connection can be established with the server, and the server actively pushes the login state digital signature to the second client.
[0145] In another embodiment, a computer-readable storage medium is provided, on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps of the secure code scanning login method are implemented.
[0146] In another embodiment, a secure code scanning login device is provided, the device comprising a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or at least one program being loaded by the processor and executing the secure code scanning login method.
[0147] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory.
[0148] Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0149] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0150] The above-mentioned embodiments only express several implementation modes of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.
Claims
1. A secure code scanning login method, characterized in that: The method comprises the following steps: The server obtains a pre-authorization request from the first client, generates a pre-authorization credential, generates a pre-authorization code image according to the pre-authorization credential, and returns the pre-authorization credential and the pre-authorization code image to the first client, so that the first client receives and displays the pre-authorization code image; The second client obtains the pre-authorization code image received by the first client, generates a login access credential and obtains a device identifier, and sends a pre-login request to the server, wherein the pre-login request includes the login access credential and the device identifier; The server obtains the pre-login request from the second client, generates a login credential, and associates the login credential with the pre-authorization credential; The server obtains a query login request from the first client, the query login request includes the pre-authorization credential, queries the validity of the pre-authorization credential, and if valid, queries the device identification according to the pre-authorization credential, and returns the device identification to the first client, so that the first client receives and displays the device identification; The server obtains the authorization request from the first client and generates a login state digital signature; The server obtains a login request from the second client and returns the login-state digital signature to the second client.
2. The method according to claim 1, characterized in that The server obtains a pre-authorization request from the first client and generates a pre-authorization credential, including: generating the pre-authorization credential according to a source IP address or MAC address of the pre-authorization request.
3. The method according to claim 2, characterized in that The server obtains a pre-login request from the second client, generates a login credential, and associates the login credential with the pre-authorization credential, including: Obtaining a pre-login request from the second client, wherein the pre-login request includes a login access credential, a pre-authorization credential, and a device identifier; Query and determine the validity of the pre-authorization credential; If valid, a login credential is generated based on the login access credential and the source IP address or MAC address of the request, and the login credential and the device identifier are associated with the pre-authorization credential.
4. The method according to claim 1, characterized in that: The server obtains the authorization request from the first client and generates a login state digital signature, including: Obtaining an authorization request from the first client, wherein the authorization request includes the pre-authorization credential; Querying the validity of the pre-authorization credentials; If valid, the login credentials are queried according to the pre-authorization credentials, and a login-state digital signature is generated at the same time, the authorization state of the login credentials is determined to be successfully authorized, and the login-state digital signature is associated with the login credentials.
5. The method according to claim 1, characterized in that The server obtains the login request from the second client and returns the login state digital signature to the second client, including: Obtaining a login request from the second client, wherein the login request includes the login access credential; Obtaining login credentials according to the login access credentials; The associated login state digital signature is queried according to the login credentials, and the login state digital signature is returned to the second client.
6. A secure code scanning login method, characterized in that: The method is applied to a first client, and the method includes: In response to the code display instruction, a pre-authorization request is initiated to the server according to the pre-authorization credential; Obtain a pre-authorization code image, the pre-authorization code image including the pre-authorization credential, and store the pre-authorization credential; Displaying the pre-authorization code image, so that the second client obtains the pre-authorization code image, parses the pre-authorization code image to obtain the pre-authorization credential, and sends a pre-login request to the server according to the pre-authorization credential; Sending a login query request to the server based on the pre-authorization credential to obtain a device identifier associated with the pre-authorization credential; Display the device identification so that the user can understand the status of the pre-authorization code being scanned; An authorization request is sent to the server based on the pre-authorization credential and the second client identifier, so that the server generates a login state digital signature and associates the login state digital signature with the login credential.
7. The method according to claim 6, characterized in that The sending a login query request to the server based on the pre-authorization credential to obtain a device identifier associated with the pre-authorization credential includes: Sending a query request to the server in a polling manner, wherein the query request includes a pre-authorization credential; If the pre-authorization credentials are valid, the device identification returned by the server is obtained.
8. A secure code scanning login method, characterized in that: The method is applied to a second client, and the method includes: In response to the login instruction, a login access credential is generated and a device identification is obtained, wherein the device identification is not limited to the following information: device name, device type, application name, application version Scan the code to obtain the pre-authorization code image displayed by the first client, parse the pre-authorization code image to obtain the pre-authorization credential, and send a pre-login request according to the pre-authorization credential; In response to successful pre-login, a login request is sent to obtain a login-state digital signature.
9. The method according to claim 8, characterized in that In response to the pre-login success, sending a login request and obtaining a login state digital signature includes: sending a login request to a server in a polling manner, wherein the login request includes a login access credential.
10. A secure code scanning login device, characterized in that: The device comprises: A pre-authorization request response module, configured to obtain a pre-authorization request from a first client, generate a pre-authorization credential, generate a pre-authorization code image according to the pre-authorization credential, and return the pre-authorization credential and the pre-authorization code image to the first client, so that the first client receives and displays the pre-authorization code image; A pre-login request response module, used to obtain a pre-login request, the pre-login request includes a pre-authorization credential, a login access credential, and a device identifier, the server generates a login credential, and associates the login credential and the device identifier with the pre-authorization credential; A query login request response module, configured to obtain a query login request from a first client, and return the queried device identifier associated with the pre-authorization credential to the first client; The authorization request response module is used to obtain the authorization request from the first client, generate a login state digital signature, and associate the login state digital signature with the device identification. A login request response module is used to obtain a login request, the login request includes a login access credential, obtain a login credential through the login access credential, query the associated login state digital signature according to the login credential, and return the login state digital signature to the second client.
11. A secure code scanning login device, characterized in that: The device comprises: A code display request processing module, used to generate a pre-authorization credential in response to a code display instruction, store the pre-authorization credential, and send a pre-authorization request to a server according to the pre-authorization credential; A pre-authorization code image acquisition module, used to acquire a pre-authorization code image, wherein the pre-authorization code image includes the pre-authorization credential; A pre-authorization code image display module, used to display the pre-authorization code image so that the second client can obtain the pre-authorization code image; A query login processing module, used for sending a query login request to a server according to the pre-authorization credentials, and the server returns a device identification associated with the pre-authorization credentials according to the pre-authorization credentials; A query login display module is used to display the device identification, wherein the device identification includes a device name, a device type, an application name and a version thereof, so that a user can observe the second client logged in using the pre-authorization credentials; The authorization processing module is used to send an authorization request according to the pre-authorization credentials in response to user authorization, rejection or automatic authorization within 5 seconds.
12. A secure code scanning login device, characterized in that: The device comprises: A login request code scanning module, used to obtain the first client pre-authorization code image in response to the login instruction, and parse the pre-authorization credentials; A pre-login request processing module, used to generate login access credentials, obtain a device identifier, and initiate a pre-login request to a server after obtaining the pre-authorization credentials; The login request processing module is used to poll and initiate a login request to the server to obtain the login state digital signature.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement a secure code scanning login method as described in any one of claims 1-5, or a secure code scanning login method as described in any one of claims 6-7, or a secure code scanning login method as described in any one of claims 8-9.
14. A secure code scanning login device, characterized in that: The device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor such as a secure code scanning login method described in any one of 1-5, or a secure code scanning login method described in any one of 6-7, or a secure code scanning login method described in any one of 8-9.
