Login method and apparatus based on open authorization protocol, and device and storage medium

By receiving and processing the client switching instructions after page jump failure in OAuth2.0 login, determining a suitable second client to complete the login, solving the problem of page jump failure between browsers, improving the login success rate and User experience.

WO2024187752A1PCT designated stage expired Publication Date: 2024-09-19SHENZHEN QIANHAI HUANRONG LIANYI INFORMATION TECHNOLOGY SERVICES CO LTD

Patent Information

Application Number
PCT/CN2023/125834
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-16
Filing Date
2023-10-23
Publication Date
2024-09-19

AI Technical Summary

Technical Problem

The existing OAuth2.0 login method has the problem of page jump failure in different browsers, resulting in poor user experience and low efficiency in manually switching browsers.

Method used

By receiving the client's login request, obtain the page jump result. If it fails, obtain the page jump configuration information, generate client switching instructions, traverse the candidate client configuration information, determine the appropriate second client, and complete it through it Login page jumps.

Benefits of technology

It improves the success rate of login page jump, simplifies the client switching process, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023125834_19092024_PF_FP_ABST
    Figure CN2023125834_19092024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computer applications. Disclosed are a login method and apparatus based on an open authorization protocol, and a device and a storage medium. The method comprises: receiving a first login request, which is sent by a first client; performing a page jump according to the first login request, so as to acquire a page jump result; if the page jump result is that the page jump fails, acquiring page jump configuration information, and generating a client switching instruction according to the page jump configuration information; acquiring, according to the client switching instruction, to-be-selected client configuration information of a plurality of clients to be selected, traversing the to-be-selected client configuration information according to the page jump configuration information, and determining a second client from among the plurality of clients to be selected; and receiving a second login request, which is sent by the second client, performing a page jump according to the second login request, and generating a login authorization page of the second client, so as to implement login by means of the login authorization page of the second client. The present application ensures a success rate of a login jump, thereby improving the usage experience of a user.
Need to check novelty before this filing date? Find Prior Art

Description

Login method, device, equipment and storage medium based on open authorization protocol

[0001] This application is based on the Chinese invention application with application number 202310281008.9 filed on March 16, 2023, and entitled “Login method, device, equipment and storage medium based on open authorization agreement”, and claims its priority. Technical Field

[0002] The present application relates to the field of computer application technology, and in particular to a login method, apparatus, device and storage medium based on an open authorization protocol. Background Art

[0003] With the development and promotion of computer web applications and mobile terminal applications, people's production and life are filled with a variety of applications, and different applications involve multiple sets of user accounts and passwords. In order to realize the multi-purpose use of user accounts and passwords, the Open Authorization login (OAuth2.0) login method came into being. OAuth2.0 uses tokens instead of user accounts and passwords to access applications. OAuth 2.0 eliminates the need for third-party applications to obtain user accounts and passwords. Instead, they log in by requesting user authorization from resource providers. For example, when a user visits a browser website to leave a message but does not want to register, he can directly use the account and password authorized by WeChat to complete the login. In addition, OAuth2.0 allows users to decide whether to allow third-party applications to access personal resources stored on the OAuth2.0 service provider. Therefore, the OAuth2.0 login method is becoming more and more popular.

[0004] When OAuth2.0 is currently used for login authorization, it is necessary to request user authorization from the resource provider through page jump to achieve login. When the third-party login page jump fails, OAuth2.0 cannot be completed. The failure of the third-party login page jump may be caused by network problems, website restrictions or browser configuration problems. In addition, the page jump process is inseparable from the browser of the terminal device. Different terminal devices use different browsers, which may cause the third-party login page jump to fail. For example, the browser may not support certain third-party logins, or the third-party login may have certain requirements for the browser's properties. At present, when the user finds that the browser fails to jump to the third-party login page, the user often needs to exit the current browser, manually select a different browser to switch, open a new browser and log in again.

[0005] Therefore, the existing OAuth2.0 has the problem of page jump failure in different browsers, and the switching efficiency of manually switching browsers is low, which affects the user experience.

[0006] Summary of the Invention

[0007] Based on this, it is necessary to provide a login method, device, computer equipment and storage medium based on an open authorization protocol to address the above technical problems, so as to solve the problem that the third-party login page jump fails easily and the user experience is poor when logging in using the open authorization protocol.

[0008] A login method based on an open authorization protocol, comprising:

[0009] receiving a first login request sent by a first client;

[0010] Performing page jump according to the first login request and obtaining page jump result;

[0011] If the page jump result is a page jump failure, obtaining page jump configuration information, and generating a client switching instruction according to the page jump configuration information;

[0012] Acquire candidate client configuration information of a plurality of candidate clients according to the client switching instruction, traverse the candidate client configuration information according to the page jump configuration information, and determine a second client among the plurality of candidate clients;

[0013] A second login request sent by the second client is received, a page jump is performed according to the second login request, and an authorized login page of the second client is generated to complete the login through the authorized login page of the second client.

[0014] A login device based on an open authorization protocol, comprising:

[0015] A first login request receiving module, configured to receive a first login request sent by a first client;

[0016] A page jump result acquisition module, configured to perform a page jump according to the first login request and obtain a page jump result;

[0017] A client switching instruction generating module is used to obtain page jump configuration information if the page jump result is a page jump failure, and generate a client switching instruction according to the page jump configuration information;

[0018] a second client determining module, configured to obtain candidate client configuration information of a plurality of candidate clients according to the client switching instruction, traverse the candidate client configuration information according to the page jump configuration information, and determine a second client among the plurality of candidate clients;

[0019] The second client login module is used to receive the second login request sent by the second client, jump to the page according to the second login request, and generate an authorized login page for the second client to complete the login through the authorized login page of the second client.

[0020] A computer device includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer-readable instructions:

[0021] receiving a first login request sent by a first client;

[0022] Performing page jump according to the first login request and obtaining page jump result;

[0023] If the page jump result is a page jump failure, obtaining page jump configuration information, and generating a client switching instruction according to the page jump configuration information;

[0024] Acquire candidate client configuration information of a plurality of candidate clients according to the client switching instruction, traverse the candidate client configuration information according to the page jump configuration information, and determine a second client among the plurality of candidate clients;

[0025] A second login request sent by the second client is received, a page jump is performed according to the second login request, and an authorized login page of the second client is generated to complete the login through the authorized login page of the second client.

[0026] A computer-readable storage medium stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors are caused to perform the following steps:

[0027] receiving a first login request sent by a first client;

[0028] Performing page jump according to the first login request and obtaining page jump result;

[0029] If the page jump result is a page jump failure, obtaining page jump configuration information, and generating a client switching instruction according to the page jump configuration information;

[0030] Acquire candidate client configuration information of a plurality of candidate clients according to the client switching instruction, traverse the candidate client configuration information according to the page jump configuration information, and determine a second client among the plurality of candidate clients;

[0031] A second login request sent by the second client is received, a page jump is performed according to the second login request, and an authorized login page of the second client is generated to complete the login through the authorized login page of the second client.

[0032] The above-mentioned login method, device, equipment and storage medium based on the open authorization protocol, the method is as follows: receiving a first login request sent by a first client; performing a page jump according to the first login request, and obtaining a page jump result; if the page jump result is a page jump failure, obtaining page jump configuration information, and generating a client switching instruction according to the page jump configuration information; obtaining the selected client configuration information of multiple selected clients according to the client switching instruction, traversing the selected client configuration information according to the page jump configuration information, and determining a second client among the multiple selected clients; receiving a second login request sent by a second client, performing a page jump according to the second login request, and generating an authorized login page for the second client, so as to complete the login through the authorized login page of the second client. After the login page jump of the first client fails, the present application determines the second client according to the page jump configuration information, thereby ensuring the success rate of the login page jump, simplifying the client switching process, and improving the convenience of login and the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0034] FIG1 is a flow chart of a login method based on an open authorization protocol in an embodiment of the present application;

[0035] FIG2 is a schematic diagram of a structure of a login device based on an open authorization protocol in an embodiment of the present application;

[0036] FIG3 is a schematic diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0038] In one embodiment, as shown in FIG1 , a login method based on an open authorization protocol is provided, including the following steps S10 - S50 .

[0039] S10: Receive a first login request sent by a first client.

[0040] Understandably, the client refers to the browser installed on the terminal device. The core component of the browser is the browser kernel, which is the rendering engine used by the browser, which determines how the browser displays the content of the web page and the format information of the page. The current mainstream browser kernels include the Trident kernel of Microsoft IE browser, the Gecko kernel used by Firefox browser, the Presto kernel used by Opera browser, and the Webkit kernel used by Chrome browser and Safari browser. The login request refers to the web page address of the page jump from the current page of the browser to the authorized login page during the open authorization login process, that is, the Uniform Resource Locator (URL). In this embodiment, the first client is the current browser, and the first login request is the web page address of the login page jump of the third-party platform triggered by the user through the current browser. The first login request contains the unique identification parameter of the current browser, and the third-party platform is used to provide open authorization services for different clients.

[0041] S20. Perform a page jump according to the first login request and obtain a page jump result.

[0042] It is understandable that when the browser triggers the login page jump event, the browser kernel sends a HyperText Transfer Protocol (HTTP) request to the web server of the third-party platform. After receiving the HTTP request, the web server generates an HTTP response based on the information carried in the corresponding HTTP request and returns it to the browser kernel. The browser kernel renders the web page corresponding to the first login request based on the HTTP response. The page jump result refers to whether the web page corresponding to the first login request can be successfully rendered on the first client. If the rendering is successful, the page jump is successful. If the rendering fails, the page jump fails. For example, online banking and payment systems only support IE browsers with Trident kernels. Other browsers that are not Trident kernels cannot perform normal payment and transfer services at all, which will cause the page jump to fail.

[0043] S30: If the page jump result is a page jump failure, obtain page jump configuration information, and generate a client switching instruction according to the page jump configuration information.

[0044] It is understandable that after the browser kernel of the current browser sends an HTTP request to the web server, the web server may not be able to receive the HTTP request because the current browser does not meet the requirements of the third-party platform, resulting in a page jump failure. After the web server receives the HTTP request, it generates an HTTP response based on the information carried in the corresponding HTTP request and returns it to the browser kernel. However, the browser may not be able to render the web page corresponding to the first login request because it does not support third-party jump login, resulting in a page jump failure. Page jump configuration information refers to information about the configuration requirements of the third-party platform for the browser, such as browser kernel type information, browser version information, and browser protocol information. When the page jump result is a page jump failure, a client switching instruction is generated according to the page jump configuration information. The client switching instruction is used to switch from the current browser to the browser corresponding to the page jump configuration information.

[0045] S40: Acquire candidate client configuration information of multiple candidate clients according to the client switching instruction, traverse the candidate client configuration information according to the page jump configuration information, and determine a second client among the multiple candidate clients.

[0046] Understandably, the "selected clients" refer to multiple browser clients installed on the current user's terminal device, and the "selected client configuration information" refers to the browser configuration information corresponding to each of the selected clients. The "second client" refers to the browser client corresponding to the page jump configuration information among the selected clients, i.e., the browser after the switch. The second client can meet the browser configuration requirements of the third-party platform. The second client and the first client can be the same or different. In one embodiment, the selected client configuration information of the multiple selected clients is traversed based on the page jump configuration information, and a one-to-one comparison is performed. The browser with a consistent comparison is determined as the second client. In another embodiment, in order to more completely and effectively display various web pages, some multi-core browsers containing at least two browser cores have emerged. The selected browser core configuration information of the multiple selected browser cores in the multi-core browser is obtained based on the client switching instruction. The multiple selected browser core configuration information is traversed based on the page jump configuration information, and the browser core corresponding to the page jump configuration information is determined as the second client, i.e., the browser core after the switch.

[0047] S50: Receive a second login request sent by the second client, redirect the page according to the second login request, generate an authorized login page for the second client, and complete the login through the authorized login page of the second client.

[0048] Understandably, the second login request is the web page address that the user triggers to jump to the login page of the third-party platform through the browser after switching, and the second login request contains the unique identification parameters of the browser after switching. In one embodiment, after determining the browser after switching, the startup parameters of the second client are obtained to open the browser after switching, and the second login request is sent to the web server of the third-party platform through the browser after switching. The web server responds to the second login request and jumps the page, and the browser after switching generates an authorized login page. In another embodiment, after determining the browser kernel after switching, the second login request is sent to the web server of the third-party platform through the browser kernel after switching. The web server responds to the second login request and jumps the page, and the browser after switching generates an authorized login page in the browser.

[0049] This embodiment receives a first login request sent by a first client; performs a page jump according to the first login request and obtains a page jump result; if the page jump result is a page jump failure, obtains page jump configuration information, and generates a client switching instruction according to the page jump configuration information; obtains the selected client configuration information of multiple selected clients according to the client switching instruction, traverses the selected client configuration information according to the page jump configuration information, and determines a second client among the multiple selected clients; receives a second login request sent by a second client, performs a page jump according to the second login request, and generates an authorized login page for the second client, so as to complete the login through the authorized login page of the second client. After the login page jump of the first client fails, this embodiment determines the second client according to the page jump configuration information, thereby ensuring the success rate of the login page jump, simplifying the client switching process, and improving the convenience of login and the user experience.

[0050] Optionally, in step S20, that is, after performing page redirection according to the first login request and obtaining the page redirection result, the method further includes:

[0051] S201: If the page jump result is successful, generate an authorization login page for the first client;

[0052] S202: Parse the first login request to obtain first client account information and first client key information;

[0053] S203: Verify the first client account information and the first client key information through the authorization login page of the first client, and generate a login authorization code for the first client after the verification is successful.

[0054] Understandably, the authorized login page of the first client refers to the authorized login page rendered by the first client. After the browser kernel of the current browser sends an HTTP request to the web server, the web server is not unable to receive the HTTP request due to the current browser not meeting the requirements of the third-party platform, nor is the web page corresponding to the first login request unable to be rendered due to the browser not supporting third-party redirect login. Therefore, the page redirect is successful, and the authorized login page is generated in the current browser. The first client account information and first client key information are the browser account information and browser key information registered by the current browser with the third-party platform. To implement authorized login between the browser and the third-party platform, the browser must submit browser registration information to the third-party platform in advance. The third-party platform generates browser account information and browser key information corresponding to the browser based on the browser registration information, which serves as authentication information for the third-party platform to verify the browser. In addition to the unique identification parameter of the current browser, the first login request also includes browser account information and browser key information corresponding to the browser. After the third-party platform verifies the browser account information and browser key information, it generates a login authorization code for the current browser. The login authorization code is an authorization identifier assigned to the current browser by the third-party platform. The current browser can use the login authorization code to obtain an access token and user identity information. In order to prevent the abuse of login authorization, the login authorization code has a certain time limit. For example, a 30-minute validity period is set for the login authorization code. After the validity period expires, it needs to be obtained again.

[0055] In this embodiment, when the page jump result of the first client is a successful page jump, the first client account information and the first client key information are directly verified to obtain the login authorization code of the third-party platform, without the need to compare the client configuration information every time the login jump occurs, further optimizing the page jump process and improving the convenience of login.

[0056] Optionally, in step S30, that is, after generating the client switching instruction according to the page jump configuration information, the step further includes:

[0057] S301, obtaining historical client configuration information according to the client switching instruction;

[0058] S302: Determine a third client according to the page jump configuration information and the historical client configuration information to receive a third login request sent by the third client.

[0059] Understandably, the third client refers to a browser client that corresponds to the page jump configuration information in the browser corresponding to the historical client configuration information. The historical client configuration information refers to the browser configuration information stored by the web server of the third-party platform that enables the page jump to be successful. The page jump configuration information and the historical client configuration information are compared. If the comparison is consistent, the browser corresponding to the page jump configuration information is obtained as the third client. At this time, the third client meets the current third-party platform's configuration requirements for the browser. The third client and the first client can be the same or different. The third login request is the web page address that the user triggers to jump to the login page of the third-party platform through the third client. The third login request contains the unique identification parameter of the third client.

[0060] This embodiment determines the third client based on the page jump configuration information and the historical client configuration information, which can narrow the scope of client configuration information comparison and eliminate the need for traversal and one-by-one comparison, thereby facilitating rapid client switching and ensuring the success rate of login page jump.

[0061] Optionally, in step S40, that is, after determining the second client among the plurality of clients to be selected, the step further includes:

[0062] S401, obtaining target access request information through a second client;

[0063] S402: Obtain second client account information and second client key information through the second client;

[0064] S403: The second client concatenates the target access request information, the second client account information, and the second client key information to generate the second login request.

[0065] Understandably, the target access request information refers to the basic website information of the target website that the user requests to access through the browser, so that after obtaining the login authorization code of the third-party platform, the target website can be browsed through the browser. The second client is the browser after the switch. With the switch of the browser, the target access information stored in the first login request has been lost, so the target access request information must be retrieved through the browser after the switch. The second client account information and the second client key information are authentication information used by the third-party platform to verify the browser after the switch. The target access request information, the second client account information and the second client key information are spliced ​​by the second client to generate a second login request, that is, the web page address for jumping to the login page is redirected from the browser after the switch to the third-party platform.

[0066] This embodiment generates a second login request by splicing parameters through the second client to achieve redirection from the browser after switching to the third-party platform for login page jump, ensuring the success rate of login page jump and improving user experience.

[0067] Optionally, in step S50, that is, redirecting the page according to the second login request to generate an authorized login page for the second client, includes:

[0068] S501: Call the server middleware according to the second login request, and obtain the authorization login page data through the server middleware;

[0069] S502: Generate an authorization login page string according to the authorization login page data;

[0070] S503: Return the authorization login page character string to the second client, so that the second client generates an authorization login page of the second client according to the authorization login page character string.

[0071] Understandably, the authorization login page of the second client refers to the authorization login page rendered on the second client, that is, the authorization login page loaded by the browser after switching. The rendering methods of the page include server-side rendering and client-side rendering, wherein the server-side rendering is to first generate a HyperText Markup Language (HTML) string on the server and then send it to the browser for rendering, while the client-side rendering is to first return an empty HTML file from the server and then load JavaScript inside the client, and the rendering of the page is completed entirely by JavaScript. In one embodiment, the server-side rendering method is adopted, and the server-side middleware is called according to the second login request. The server will first execute the "_app.getInitialProps" method, and then traverse all the "_page.getInitialProps" methods to obtain all the authorization login page data and assemble them to generate the authorization login page HTML string. The server returns the authorization login page HTML string to the second client, so that the second client generates the second client's authorization login page according to the authorization login page string.

[0072] This embodiment generates an authorization login page on the second client through server-side rendering, which helps to quickly load the authorization login page and improves the user experience.

[0073] Optionally, in step S50, that is, after redirecting the page according to the second login request and generating the authorized login page of the second client, the method further includes:

[0074] S504: Parse the second login request to obtain the second client account information and the second client key information;

[0075] S505: Verify the second client account information and the second client key information through the authorization login page of the second client, and generate a login authorization code for the second client after the verification is successful.

[0076] Understandably, the web server of the third-party platform parses the second login request, obtains the second client account information and the second client key information, and verifies them. After the verification is successful, it generates a login authorization code for the second client, thus completing the authorized login of the browser after the switch. In one embodiment, authorized login is implemented through GitHub as a third-party platform, wherein the user enters the target website through the second client, and the web server of the third-party platform GitHub redirects the second client's page through the second login request, so that the page jumps to the GitHub authorized login page. The second client account information and the second client key information are verified through the GitHub authorized login page, and the login authorization code is returned to the second client after the verification is successful.

[0077] This embodiment verifies the second client account information and the second client key information, thereby redirecting the browser after switching to the third-party platform for login page jump, ensuring the success rate of login page jump and improving the user experience.

[0078] Optionally, in step S50, that is, before receiving the second login request sent by the second client, the following steps are included:

[0079] S506: Compare the first client and the second client to determine whether they are identical;

[0080] S507: If they are the same, generate fault notification information, which is used to help the user eliminate network failure problems and client limitation problems caused by page jumps.

[0081] Understandably, the browser after switching may be the same as the browser before switching, that is, the current browser is already the browser corresponding to the page jump configuration information. Even if the browser after switching is changed, the page jump will still fail. At this time, simply switching the browser cannot solve the problem. It needs to be solved from the aspects of network and client restrictions. In addition to the browser configuration problem, the failure of the third-party login page jump is also related to network problems and client restrictions. For example, the client needs to use a specific domain name, a specific callback address and a specific login page. In one embodiment, when the browser after switching is the same as the current browser, a fault notification message is generated, allowing the user to troubleshoot the network failure problem and client restriction problem of the page jump based on the fault notification message.

[0082] This embodiment directly generates fault notification information when the first client and the second client are the same, so that the user can check the problem in a targeted manner, solve the page jump failure problem in time, and improve the efficiency of login page jump.

[0083] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0084] In one embodiment, a login device based on an open authorization protocol is provided. This login device based on an open authorization protocol corresponds one-to-one with the login method based on the open authorization protocol in the above-mentioned embodiment. As shown in Figure 2, this login device based on an open authorization protocol includes a first login request receiving module 10, a page jump result acquisition module 20, a client switching instruction generation module 30, a second client determination module 40, and a second client login module 50. The functional modules are described in detail as follows:

[0085] A first login request receiving module 10 is configured to receive a first login request sent by a first client;

[0086] A page jump result acquisition module 20, configured to perform a page jump according to the first login request and acquire a page jump result;

[0087] The client switching instruction generating module 30 is configured to obtain page jump configuration information if the page jump result is a page jump failure, and generate a client switching instruction according to the page jump configuration information;

[0088] A second client determining module 40 is configured to obtain candidate client configuration information of a plurality of candidate clients according to the client switching instruction, traverse the candidate client configuration information according to the page jump configuration information, and determine a second client among the plurality of candidate clients;

[0089] The second client login module 50 is configured to receive a second login request sent by the second client, redirect the page according to the second login request, and generate an authorized login page for the second client, so as to complete the login through the authorized login page of the second client.

[0090] Optionally, the page jump result acquisition module 20 includes:

[0091] A first client page generating unit is configured to generate an authorization login page for the first client if the page jump result is that the page jump is successful;

[0092] a first login request parsing unit, configured to parse the first login request and obtain first client account information and first client key information;

[0093] The first login authorization code generating unit is used to verify the first client account information and the first client key information through the authorization login page of the first client, and generate a login authorization code for the first client after the verification is passed.

[0094] Optionally, the client switching instruction generating module 30 includes:

[0095] A historical client configuration information acquiring unit, configured to acquire historical client configuration information according to the client switching instruction;

[0096] The third client determining unit is configured to determine a third client according to the page jump configuration information and the historical client configuration information, so as to receive a third login request sent by the third client.

[0097] Optionally, the second client determination module 40 includes:

[0098] a target access request information acquiring unit, configured to acquire target access request information through a second client;

[0099] A second client information acquiring unit, configured to acquire second client account information and second client key information through the second client;

[0100] The second login request generating unit is configured to concatenate the target access request information, the second client account information, and the second client key information through the second client to generate the second login request.

[0101] Optionally, the second client login module 50 includes:

[0102] an authorization login page data acquisition unit, configured to call the server-side middleware according to the second login request, and acquire the authorization login page data through the server-side middleware;

[0103] An authorization login page character string generating unit, configured to generate an authorization login page character string according to the authorization login page data;

[0104] The second authorization login page generating unit is configured to return the authorization login page character string to the second client, so that the second client generates an authorization login page of the second client according to the authorization login page character string.

[0105] Optionally, the second client login module 50 further includes:

[0106] A second login request parsing unit, configured to parse the second login request and obtain the second client account information and the second client key information;

[0107] The second login authorization code generating unit is used to verify the second client account information and the second client key information through the authorization login page of the second client, and generate a login authorization code for the second client after the verification is passed.

[0108] Optionally, the second client login module 50 further includes:

[0109] a client comparison unit, configured to compare the first client with the second client to determine whether they are identical;

[0110] The fault notification information generating unit is used to generate fault notification information if they are the same, and the fault notification information is used to enable the user to eliminate the network failure problem and client limitation problem caused by page jump.

[0111] For the specific definition of the login device based on the open authorization protocol, please refer to the definition of the login method based on the open authorization protocol above, which will not be repeated here. The various modules in the above-mentioned login device based on the open authorization protocol can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0112] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in FIG3 . The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer-readable instructions are executed by the processor, a login method based on an open authorization protocol is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.

[0113] In one embodiment, a computer device is provided, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the following steps are implemented:

[0114] receiving a first login request sent by a first client;

[0115] Performing page jump according to the first login request and obtaining page jump result;

[0116] If the page jump result is a page jump failure, obtaining page jump configuration information, and generating a client switching instruction according to the page jump configuration information;

[0117] Acquire candidate client configuration information of a plurality of candidate clients according to the client switching instruction, traverse the candidate client configuration information according to the page jump configuration information, and determine a second client among the plurality of candidate clients;

[0118] A second login request sent by the second client is received, a page jump is performed according to the second login request, and an authorized login page of the second client is generated to complete the login through the authorized login page of the second client.

[0119] In one embodiment, after performing a page jump according to the first login request and obtaining a page jump result, the processor further implements the following steps when executing the computer-readable instructions:

[0120] If the page jump result is that the page jump is successful, generating an authorization login page for the first client;

[0121] Parsing the first login request to obtain first client account information and first client key information;

[0122] The first client account information and the first client key information are verified through the authorization login page of the first client, and a login authorization code for the first client is generated after the verification is passed.

[0123] In one embodiment, after generating the client switching instruction according to the page jump configuration information, the processor further implements the following steps when executing the computer-readable instructions:

[0124] Acquire historical client configuration information according to the client switching instruction;

[0125] A third client is determined according to the page jump configuration information and the historical client configuration information to receive a third login request sent by the third client.

[0126] In one embodiment, redirecting a page according to the second login request to generate an authorized login page for the second client includes:

[0127] calling the server middleware according to the second login request, and obtaining the authorization login page data through the server middleware;

[0128] Generate an authorization login page string according to the authorization login page data;

[0129] The authorization login page character string is returned to the second client, so that the second client generates an authorization login page of the second client according to the authorization login page character string.

[0130] In one embodiment, after redirecting the page according to the second login request and generating the authorized login page of the second client, the processor further implements the following steps when executing the computer-readable instructions:

[0131] Parse the second login request to obtain the second client account information and the second client key information;

[0132] The second client account information and the second client key information are verified through the authorization login page of the second client, and a login authorization code for the second client is generated after the verification is passed.

[0133] In one embodiment, before receiving the second login request sent by the second client, the processor further implements the following steps when executing the computer-readable instructions:

[0134] Comparing the first client and the second client to determine whether they are identical;

[0135] If they are the same, a fault notification message is generated, which is used to help the user eliminate network failure problems and client limitation problems caused by page jumps.

[0136] In one embodiment, one or more computer-readable storage media storing computer-readable instructions are provided. The computer-readable storage media provided in this embodiment include non-volatile computer-readable storage media and volatile computer-readable storage media. The computer-readable storage media store computer-readable instructions that, when executed by one or more processors, implement the following steps:

[0137] receiving a first login request sent by a first client;

[0138] Performing page jump according to the first login request and obtaining page jump result;

[0139] If the page jump result is a page jump failure, obtaining page jump configuration information, and generating a client switching instruction according to the page jump configuration information;

[0140] Acquire candidate client configuration information of a plurality of candidate clients according to the client switching instruction, traverse the candidate client configuration information according to the page jump configuration information, and determine a second client among the plurality of candidate clients;

[0141] A second login request sent by the second client is received, a page jump is performed according to the second login request, and an authorized login page of the second client is generated to complete the login through the authorized login page of the second client.

[0142] In one embodiment, after performing a page jump according to the first login request and obtaining a page jump result, when the computer-readable instructions are executed by one or more processors, the one or more processors further perform the following steps:

[0143] If the page jump result is that the page jump is successful, generating an authorization login page for the first client;

[0144] Parsing the first login request to obtain first client account information and first client key information;

[0145] The first client account information and the first client key information are verified through the authorization login page of the first client, and a login authorization code for the first client is generated after the verification is passed.

[0146] In one embodiment, after generating the client switching instruction according to the page jump configuration information, when the computer-readable instructions are executed by one or more processors, the one or more processors further execute the following steps:

[0147] Acquire historical client configuration information according to the client switching instruction;

[0148] A third client is determined according to the page jump configuration information and the historical client configuration information to receive a third login request sent by the third client.

[0149] In one embodiment, redirecting a page according to the second login request to generate an authorized login page for the second client includes:

[0150] calling the server middleware according to the second login request, and obtaining the authorization login page data through the server middleware;

[0151] Generate an authorization login page string according to the authorization login page data;

[0152] The authorization login page character string is returned to the second client, so that the second client generates an authorization login page of the second client according to the authorization login page character string.

[0153] In one embodiment, after page redirection is performed according to the second login request to generate the authorized login page of the second client, when the computer-readable instructions are executed by one or more processors, the one or more processors further perform the following steps:

[0154] Parse the second login request to obtain the second client account information and the second client key information;

[0155] The second client account information and the second client key information are verified through the authorization login page of the second client, and a login authorization code for the second client is generated after the verification is passed.

[0156] In one embodiment, before receiving the second login request sent by the second client, when the computer-readable instructions are executed by one or more processors, the one or more processors further perform the following steps:

[0157] Comparing the first client and the second client to determine whether they are identical;

[0158] If they are the same, a fault notification message is generated, which is used to help the user eliminate network failure problems and client limitation problems caused by page jumps.

[0159] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they 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 may include non-volatile and / or volatile memory. 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 many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0160] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0161] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A login method based on an open authorization protocol, wherein: include: Receiving a first login request sent by a first client; Performing a page jump according to the first login request, and obtaining a page jump result; If the page jump result is a page jump failure, obtaining page jump configuration information, and generating a client switching instruction according to the page jump configuration information; Acquire the candidate client configuration information of the plurality of candidate clients according to the client switching instruction, traverse the candidate client configuration information according to the page jump configuration information, and determine the second client among the plurality of candidate clients; A second login request sent by the second client is received, a page jump is performed according to the second login request, and an authorized login page of the second client is generated to complete the login through the authorized login page of the second client.

2. The login method based on the open authorization protocol as claimed in claim 1, wherein: After performing page jump according to the first login request and obtaining the page jump result, the method further includes: If the page jump result is that the page jump is successful, generating an authorization login page for the first client; Parsing the first login request to obtain first client account information and first client key information; The first client account information and the first client key information are verified through the authorization login page of the first client, and a login authorization code of the first client is generated after the verification is passed.

3. The login method based on the open authorization protocol as claimed in claim 1, wherein: After the client switching instruction is generated according to the page jump configuration information, the method further includes: Acquire historical client configuration information according to the client switching instruction; A third client is determined according to the page jump configuration information and the historical client configuration information to receive a third login request sent by the third client.

4. The login method based on the open authorization protocol as claimed in claim 1, wherein: After determining the second client among the plurality of the to-be-selected clients, the method further includes: Obtaining target access request information through a second client; Acquire the second client account information and the second client key information through the second client; The second client concatenates the target access request information, the second client account information and the second client key information to generate the second login request.

5. The login method based on the open authorization protocol as claimed in claim 1, wherein: The step of redirecting a page according to the second login request to generate an authorization login page for the second client includes: Calling the server-side middleware according to the second login request, and obtaining the authorization login page data through the server-side middleware; Generate an authorization login page string according to the authorization login page data; The authorization login page character string is returned to the second client, so that the second client generates an authorization login page of the second client according to the authorization login page character string.

6. The login method based on the open authorization protocol as claimed in claim 1, wherein: After redirecting the page according to the second login request and generating the authorization login page of the second client, the method further includes: Parse the second login request to obtain the second client account information and the second client key information; The second client account information and the second client key information are verified through the second client's authorization login page, and a login authorization code for the second client is generated after the verification is passed.

7. The login method based on the open authorization protocol as claimed in claim 1, wherein: Before receiving the second login request sent by the second client, the method includes: Comparing the first client with the second client to determine whether they are the same; If they are the same, a fault notification message is generated, and the fault notification message is used to enable the user to eliminate network failure problems and client limitation problems caused by page jumps.

8. A login device based on an open authorization protocol, wherein: include: A first login request receiving module, used to receive a first login request sent by a first client; A page jump result acquisition module, used to perform a page jump according to the first login request and obtain a page jump result; A client switching instruction generating module, used for obtaining page jump configuration information if the page jump result is a page jump failure, and generating a client switching instruction according to the page jump configuration information; A second client determination module is used to obtain the candidate client configuration information of multiple candidate clients according to the client switching instruction, traverse the candidate client configuration information according to the page jump configuration information, and determine the second client among the multiple candidate clients; The second client login module is used to receive the second login request sent by the second client, perform page jump according to the second login request, and generate an authorized login page for the second client to complete the login through the authorized login page of the second client.

9. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein: When the processor executes the computer-readable instructions, the following steps are implemented: Receiving a first login request sent by a first client; Performing a page jump according to the first login request, and obtaining a page jump result; If the page jump result is a page jump failure, obtaining page jump configuration information, and generating a client switching instruction according to the page jump configuration information; Acquire the candidate client configuration information of the plurality of candidate clients according to the client switching instruction, traverse the candidate client configuration information according to the page jump configuration information, and determine the second client among the plurality of candidate clients; A second login request sent by the second client is received, a page jump is performed according to the second login request, and an authorized login page of the second client is generated to complete the login through the authorized login page of the second client.

10. The computer device of claim 9, wherein: After performing page jump according to the first login request and obtaining the page jump result, the processor further implements the following steps when executing the computer-readable instructions: If the page jump result is that the page jump is successful, generating an authorization login page for the first client; Parsing the first login request to obtain first client account information and first client key information; The first client account information and the first client key information are verified through the authorization login page of the first client, and a login authorization code of the first client is generated after the verification is passed.

11. The computer device of claim 9, wherein: After the client switching instruction is generated according to the page jump configuration information, the processor further implements the following steps when executing the computer-readable instruction: Acquire historical client configuration information according to the client switching instruction; A third client is determined according to the page jump configuration information and the historical client configuration information to receive a third login request sent by the third client.

12. The computer device of claim 9, wherein: The step of redirecting a page according to the second login request to generate an authorization login page for the second client includes: Calling the server-side middleware according to the second login request, and obtaining the authorization login page data through the server-side middleware; Generate an authorization login page string according to the authorization login page data; The authorization login page character string is returned to the second client, so that the second client generates an authorization login page of the second client according to the authorization login page character string.

13. The computer device of claim 9, wherein: After the page jump is performed according to the second login request to generate the authorization login page of the second client, the processor further implements the following steps when executing the computer-readable instructions: Parse the second login request to obtain the second client account information and the second client key information; The second client account information and the second client are authenticated through the second client's authorization login page. The key information is verified, and after the verification is passed, a login authorization code for the second client is generated.

14. The computer device of claim 9, wherein: Before receiving the second login request sent by the second client, the processor further implements the following steps when executing the computer-readable instructions: Comparing the first client with the second client to determine whether they are the same; If they are the same, a fault notification message is generated, and the fault notification message is used to enable the user to eliminate network failure problems and client limitation problems caused by page jumps.

15. A computer-readable storage medium storing computer-readable instructions, wherein: When the computer readable instructions are executed by one or more processors, the one or more processors perform the following steps: Receiving a first login request sent by a first client; Performing a page jump according to the first login request, and obtaining a page jump result; If the page jump result is a page jump failure, obtaining page jump configuration information, and generating a client switching instruction according to the page jump configuration information; Acquire the candidate client configuration information of the plurality of candidate clients according to the client switching instruction, traverse the candidate client configuration information according to the page jump configuration information, and determine the second client among the plurality of candidate clients; A second login request sent by the second client is received, a page jump is performed according to the second login request, and an authorized login page of the second client is generated to complete the login through the authorized login page of the second client.

16. The computer-readable storage medium of claim 15, wherein: After performing page redirection according to the first login request and obtaining the page redirection result, when the computer-readable instructions are executed by one or more processors, the one or more processors further perform the following steps: If the page jump result is that the page jump is successful, generating an authorization login page for the first client; Parsing the first login request to obtain first client account information and first client key information; The first client account information and the first client key information are verified through the authorization login page of the first client, and a login authorization code of the first client is generated after the verification is passed.

17. The computer-readable storage medium of claim 15, wherein: After the client switching instruction is generated according to the page jump configuration information, when the computer-readable instruction is executed by one or more processors, the one or more processors further execute the following steps: Acquire historical client configuration information according to the client switching instruction; A third client is determined according to the page jump configuration information and the historical client configuration information to receive a third login request sent by the third client.

18. The computer-readable storage medium of claim 15, wherein: The step of redirecting a page according to the second login request to generate an authorization login page for the second client includes: Calling the server-side middleware according to the second login request, and obtaining the authorization login page data through the server-side middleware; Generate an authorization login page string according to the authorization login page data; The authorization login page character string is returned to the second client, so that the second client generates an authorization login page of the second client according to the authorization login page character string.

19. The computer-readable storage medium of claim 15, wherein: After the page jump is performed according to the second login request to generate the authorization login page of the second client, when the computer-readable instructions are executed by one or more processors, the one or more processors further perform the following steps: Parse the second login request to obtain the second client account information and the second client key information; The second client account information and the second client key information are verified through the second client's authorization login page, and a login authorization code for the second client is generated after the verification is passed.

20. The computer-readable storage medium of claim 15, wherein: Before receiving the second login request sent by the second client, when the computer-readable instructions are executed by one or more processors, the one or more processors further execute the following steps: Comparing the first client with the second client to determine whether they are the same; If they are the same, a fault notification message is generated, and the fault notification message is used to enable the user to eliminate network failure problems and client limitation problems caused by page jumps.

Citation Information

Patent Citations

  • Method and device for controlling login state based on mini-program architecture

    CN109995755A

  • Website login method and device, readable medium and electronic equipment

    CN112448917A

  • Open authorization method, device and equipment and storage medium

    CN114079569A

  • Login method and device based on open authorization protocol, equipment and storage medium

    CN116405268A

  • Cross-device authentication method and apparatus

    WO2023024887A1

Cited By

  • Public authorization authentication method and system, storage medium and program product

    CN119885142A