A login authentication method, apparatus and system
By using the SSO_TICKET-based identity authorization method, the AI Agent can legally inherit identities by leveraging the existing SSO system's ticket mechanism without modifying the target system. This solves the authentication problem when the AI Agent accesses enterprise intranet resources and improves the system's versatility and compatibility.
Patent Information
- Application Number
- CN202511263294.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2045-09-04
AI Technical Summary
In existing technologies, AI agents face access interruption issues when accessing enterprise intranet systems due to a lack of valid identity credentials. This is especially true when the target system does not support standard authorization protocols such as OAuth, making it difficult to achieve legitimate identity inheritance and secure use. Furthermore, system modification costs are high and comprehensive coverage is difficult to achieve.
The SSO_TICKET-based identity authorization method is adopted. The login center issues user authorization login tickets and utilizes the ticket mechanism of the existing SSO system to enable the AI Agent to legally carry user identity credentials in the browser's automated operation, thereby achieving seamless access to protected resources and avoiding modification of the target system.
It improves the versatility and compatibility of the system without modifying the existing system, ensures the continuous and stable operation of the AI Agent, and supports its large-scale application in enterprise office scenarios.
Smart Images

Figure CN121151026B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a login authentication method, apparatus, and system. Background Technology
[0002] With the widespread application of large model-driven AI agents, they need to frequently access enterprise intranet systems to complete tasks. Such systems generally use identity authentication mechanisms to protect sensitive data. Therefore, achieving legitimate identity authentication for AI agents without human intervention has become a key technical challenge to ensure their continuous and secure task execution.
[0003] Existing technologies primarily employ the OAuth protocol for authentication. This approach authenticates client applications through an authorization server and issues access tokens to access protected resources. However, this method requires protocol adaptation and interface modifications to the target system, making it unsuitable for systems that do not integrate OAuth. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a login authentication method, apparatus and system that can improve the versatility of the system.
[0005] In a first aspect, embodiments of the present invention provide a login authentication method applied to a login system, the method comprising:
[0006] In response to the first application completing login authentication, a login ticket is issued to the first application, and the first application accesses the second application through a remote browser based on the login ticket;
[0007] Receive a first verification request sent by a second application, the first verification request including the login ticket, and verify the login-free relationship between the first application and the second application based on the login ticket;
[0008] In response to the fact that the first application and the second application have a login-free relationship, a verification success message is sent to the second application so that the second application can successfully log in without login, and the first application can access the data of the second application;
[0009] In response to the absence of a login-free relationship between the first application and the second application, the central login status corresponding to the login ticket is determined;
[0010] The login process is executed based on the central login status.
[0011] Secondly, embodiments of the present invention provide a login authentication system, which includes a first application, a second application, a remote browser, a local browser, and a login system;
[0012] After the first application completes login authentication, the login system issues a login ticket to the first application, and the first application accesses the second application through a remote browser based on the login ticket;
[0013] The login system receives a first verification request sent by the second application, the first verification request including the login ticket, and verifies the login-free relationship between the first application and the second application based on the login ticket;
[0014] In response to the existence of a login-free relationship between the first application and the second application, the login system sends a verification success message to the second application, so that the second application can successfully log in without login, and the first application can access the data of the second application;
[0015] The login system responds to the fact that there is no login-free relationship between the first application and the second application, determines the central login state corresponding to the login ticket, and executes the login process according to the central login state.
[0016] Thirdly, embodiments of the present invention provide a login authentication device for use in a login system, the device comprising:
[0017] The ticket issuing unit is used to issue a login ticket to the first application in response to the first application completing login authentication, and the first application accesses the second application through a remote browser based on the login ticket.
[0018] The first receiving unit is configured to receive a first verification request sent by the second application, the first verification request including the login ticket, and verify the login-free relationship between the first application and the second application based on the login ticket;
[0019] The verification success information sending unit is used to send verification success information to the second application in response to the existence of a login-free relationship between the first application and the second application, so that the second application can successfully log in without login and the first application can access the data of the second application;
[0020] A central login status determination unit is used to determine the central login status corresponding to the login ticket in response to the absence of a login-free relationship between the first application and the second application.
[0021] The login process execution unit is used to execute the login process according to the central login status.
[0022] Fourthly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in the first aspect.
[0023] The technical solution of this invention involves a login center responding to a first application's login authentication by issuing a login ticket to the first application. The first application, based on the login ticket, accesses a second application via a remote browser, receives a first verification request from the second application, and verifies the login-free relationship between the first and second applications based on the login ticket. If a login-free relationship exists between the first and second applications, a verification success message is sent to the second application, enabling successful login-free access for the second application. The first application then accesses data in the second application. If no login-free relationship exists between the first and second applications, the center determines the login state corresponding to the login ticket and executes the login process based on the login state. Therefore, identity verification can be achieved without modifying the target system, improving the system's versatility. Attached Figure Description
[0024] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings, in which:
[0025] Figure 1 This is a schematic diagram of the login authentication system according to an embodiment of the present invention;
[0026] Figure 2 This is a flowchart of the login authentication method according to the first embodiment of the present invention;
[0027] Figure 3 This is a flowchart illustrating the determination of login-free relationships according to an embodiment of the present invention;
[0028] Figure 4 This is a flowchart of the login authentication method according to the second embodiment of the present invention;
[0029] Figure 5 This is a flowchart of the login authentication method according to the third embodiment of the present invention;
[0030] Figure 6 This is a flowchart of the login authentication method according to the fourth embodiment of the present invention;
[0031] Figure 7 This is a flowchart of the login authentication method according to the fifth embodiment of the present invention;
[0032] Figure 8 This is a schematic diagram of the login authentication device according to an embodiment of the present invention;
[0033] Figure 9 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0034] The present application is described below based on embodiments, but it is not limited to these embodiments. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without these details. To avoid obscuring the substance of the present application, well-known methods, processes, flows, elements, and circuits are not described in detail.
[0035] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.
[0036] Unless the context explicitly requires it, words such as "including" or "contains" throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".
[0037] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0038] The solutions described in this specification and embodiments, if involving the processing of personal information, will be processed only under the premise of having a legal basis (such as obtaining the consent of the personal information subject, or being necessary for the performance of a contract), and will only be processed within the scope stipulated or agreed upon. A user's refusal to process personal information beyond what is necessary for basic functions will not affect the user's use of basic functions.
[0039] The following explains the terms used in the embodiments of the present invention:
[0040] AI Agent (Artificial Intelligence Agent): Refers to an intelligent software entity capable of perceiving its environment, making autonomous decisions, and executing actions to achieve specific goals. In this invention, it specifically refers to an assistant-type AI agent in an enterprise office setting, representing users in performing operations such as information retrieval and task processing. Its core functions include understanding user intent, planning task flows, interacting with various systems, and providing feedback on completed results.
[0041] Browser-use refers to a type of technology or software library that allows artificial intelligence models to programmatically control web browsers to perform automated operations. This technology enables AIAgent to simulate real user behaviors such as mouse clicks, keyboard input, and page navigation, thereby accessing and crawling web page content that does not provide standard API interfaces.
[0042] OAuth (Open Authorization) protocol: refers to an open standard authorization framework (such as OAuth 2.0) that allows users to authorize access to resources stored by them at another service provider without directly providing their username and password to third-party applications.
[0043] SSO (Single Sign-On): refers to an authentication mechanism that allows users to access all authorized systems in multiple interconnected but independent application systems with just one login, without having to repeatedly enter authentication credentials.
[0044] SSO_TICKET (Login Ticket): In the SSO authentication system, this refers to a one-time, time-limited ticket issued by the Identity Provider (IdP) server after a user successfully logs in. This ticket is typically passed to the target system as a URL (Uniform Resource Locator) parameter or HTTP (Hypertext Transfer Protocol) header information to verify the user's identity.
[0045] SSO_TOKEN (Login Token): This refers to a session token generated and maintained by the system or session management component after an SSO session is established. It is used to maintain the user's login status during subsequent visits (usually stored in a cookie or local storage). Unlike the one-time use SSO_TICKET, SSO_TOKEN can be used multiple times within its validity period until the session expires or the user actively logs out.
[0046] With the rapid development of artificial intelligence technology, especially the significant improvement of Large Language Models (LLMs) in natural language understanding, logical reasoning, and task planning, AI Agents (Artificial Intelligence Agents) are gradually evolving from a simple question-and-answer interaction mode into intelligent agents with autonomous decision-making and multi-step execution capabilities. In application scenarios such as office automation and intelligent enterprise services, assistant-type AI Agents, acting as a bridge connecting user intent and internal enterprise systems, undertake core functions such as information retrieval, process assistance, and task delegation, and their application value is increasingly prominent. Particularly in enterprise-level office environments, AI Agents need to frequently access various heterogeneous systems within the intranet (such as human resources systems, financial approval platforms, project management systems, and internal knowledge bases) to complete cross-system data integration and task execution. However, these systems are typically protected by strict identity authentication and access control mechanisms to ensure the security and compliance of enterprise data. Therefore, how to enable AI Agents to legally and efficiently represent users to access protected intranet resources while ensuring security has become a key technical bottleneck restricting their practical implementation.
[0047] Currently, to enable AI agents to quickly access multi-source heterogeneous systems, the industry generally adopts data acquisition solutions based on Human-Computer Interface (HCI), which involves simulating user actions in a browser (such as clicking, typing, and scrolling) to obtain the required information. This method does not rely on the target system providing standardized APIs (Application Programming Interfaces), has strong generalization capabilities and low access costs, and can quickly cover a large number of traditional systems lacking open interfaces. AI browser control tools, represented by Browser-use, have emerged as a core technology for achieving automated operations on such interfaces. AI agents can use these tools to execute scripts in the browser environment, simulating real user behavior, thereby completing information extraction and task execution.
[0048] However, this technical approach faces a fundamental challenge in practical applications: identity authentication. When an AI Agent attempts to access protected intranet resources, the system typically requires the user to complete an identity authentication process. Traditional session maintenance mechanisms (such as cookies and sessions) are based on the user's active login. The AI Agent itself does not possess independent identity credentials and cannot directly inherit the user's existing login state, leading to frequent access interceptions and task execution chain interruptions during execution, severely impacting service continuity and user experience.
[0049] To address the aforementioned issues, various identity authorization schemes have been proposed, among which the standardized authorization framework represented by the OAuth (Open Authorization) protocol is widely considered a relatively ideal solution. This scheme allows third-party applications to access protected resources through a secure token mechanism after user authorization, offering good security and scalability. However, the implementation of this scheme requires the target system to support the OAuth protocol and undergo corresponding application modifications, including client registration, implementation of authorization endpoints, and integration of token verification logic. Within most enterprises, especially those with earlier traditional IT infrastructure, existing authentication systems are mostly based on self-developed Single Sign-On (SSO) systems, using login SDKs (Software Development Kits) or proprietary authentication middleware for user authentication and session management. The OAuth standard is generally not adopted between systems. Therefore, promoting OAuth transformation across all existing systems is not only costly and time-consuming but also presents significant technical risks and organizational coordination difficulties, making comprehensive coverage difficult to achieve in the short term and severely limiting the feasibility of this solution.
[0050] Against this backdrop, there is an urgent need for an identity authorization mechanism that is compatible with existing authentication systems, requires no modification to the target system, and ensures security, in order to support the continuous and stable operation of AI Agents in complex enterprise environments. This invention aims to solve the problem of access interruption caused by the lack of valid identity credentials when AI Agents access protected resources on the intranet in existing technologies, especially in scenarios where the target system does not support standard authorization protocols such as OAuth and relies solely on the SSO authentication system. This raises the question of how to achieve the legitimate inheritance and secure use of user identities by the AI Agent. To this end, this invention proposes an identity authorization method based on SSO_TICKET. It fully utilizes the ticket mechanism commonly supported by existing enterprise SSO systems. Through a secure ticket acquisition, transmission, and injection process, the AI Agent can legitimately carry user identity credentials in automated browser operations, thereby transparently passing the target system's authentication checks and achieving seamless access to protected resources. This solution requires no code modification to the existing system, possesses extremely high compatibility and ease of deployment, effectively overcomes the difficulty of implementing existing OAuth solutions in existing enterprise systems, and provides key technical support for the large-scale application of assistant-type AI Agents in enterprise office scenarios.
[0051] Figure 1 This is a schematic diagram of a login authentication system according to an embodiment of the present invention. Figure 1As shown, the login authentication system of this embodiment includes a first application 1, a second application 2, a local browser 3, a remote browser 4, a login system 5, and a network 6. The first application 1, the second application 2, the local browser 3, the remote browser 4, and the login system 5 interact with each other via the network 6.
[0052] In this context, the first application 1 is the AI Agent, which is the resource access party, and its goal is to obtain the desired data from the second application.
[0053] The second application is the resource provider. In other words, the second application is the target system that the first application wants to obtain data from, such as a human resources system, a financial system, an office system, etc.
[0054] The local browser 3 is either a user-operable browser or an iframe container for the primary application. When the local browser 3 is a user-operable browser, the primary application can run within it via plugins or web pages. When the local browser 3 is an iframe container for the primary application, the local browser is a child window created by the primary application within the browser to display relevant content.
[0055] Remote Browser 4 is a browser that runs on a remote server and can be remotely controlled by a program. Its function is to open web pages of a second application and retrieve data from the page.
[0056] Login system 5 is a unified identity authentication platform used for login authentication. Furthermore, the login system is a Single Sign-On (SSO) system.
[0057] In this embodiment, the first application (AI Agent) itself needs to complete login authentication and possess a legitimate identity. It registers in the login system 5, generating an account and password for the first application. The AI Agent, as an application, connects to the unified login center. After logging in, the login system 5 issues a user authorization login ticket (user authorization SSO_TICKET) to the first application. The user authorization SSO_TICKET is a new type of SSO_TICKET, containing the functionality of the original SSO_TICKET, but supporting user confirmation after failed login attempts to achieve unauthorized login.
[0058] When application 1 wants to retrieve data from application 2, it accesses application 2 via remote browser 2 based on the login ticket SSO_TICKET. Specifically, application 1 obtains the link (access address) of application 2, concatenates the obtained login ticket SSO_TICKET with the link of application 2 to obtain a new link, and sends the new link to the remote browser to control the remote browser to open the link. In some embodiments, the generated new link also includes query parameters, which are used to indicate the page to be accessed, that is, to indicate which page in application 2 needs to be accessed. The login ticket can be added to the query parameters.
[0059] After receiving a link from the first application, the remote browser accesses the link. The second application receives this access request and begins processing it. It parses the link and checks if it includes a login ticket. If a login ticket is included, the second application sends a first verification request to the login system. This first verification request includes the login ticket. The login system verifies the login-free relationship between the first and second applications based on the login ticket. If a login ticket is not included, the second application can return a redirect, instructing the browser to log in first.
[0060] After receiving the first verification request, the login system parses the request to obtain a login ticket. It checks whether the login ticket (SSO_TICKET) exists and has not expired, and whether it has been used before. If both conditions are met, it checks whether it matches the requested application (the second application). Specifically, based on the login ticket, it determines the first and second applications, and checks whether they are pre-configured mutually trusted applications. Pre-configured mutually trusted applications mean that the first and second applications have been pre-configured or authorized at the system level, allowing "login-free" redirection or identity transfer under specific conditions. If the first and second applications are pre-configured mutually trusted applications, it determines that a login-free relationship exists between them. If the first and second applications are not pre-configured mutually trusted applications, it checks whether the user has authorized the first application to access the second application. If the user has previously authorized the first application to access the second application and checked "automatically allow," it indicates that the user has authorized the first application to access the second application; in response to the user's authorization, it determines that a login-free relationship exists between the first and second applications.
[0061] In response to the fact that the first application and the second application have a login-free relationship, the login center sends a verification success message to the second application, so that the second application can successfully log in without login, and the first application can access the data of the second application.
[0062] In response to the absence of a login-free relationship between the first application and the second application, the login system determines the central login state corresponding to the login ticket and executes the login process based on the central login state. The central login state is, in a single sign-on system, global session information maintained by the unified identity authentication center after the user completes identity verification, representing the user's "logged-in" status.
[0063] In this embodiment of the invention, a login center responds to a first application's login authentication by issuing a login ticket to the first application. The first application, based on the login ticket, accesses a second application via a remote browser, receives a first verification request from the second application, and verifies the login-free relationship between the first and second applications based on the login ticket. If a login-free relationship exists between the first and second applications, a verification success message is sent to the second application, enabling successful login-free access for the second application. The first application then accesses data in the second application. If no login-free relationship exists between the first and second applications, the center determines the login state corresponding to the login ticket and executes the login process based on the login state. Therefore, identity verification can be achieved without modifying the target system, improving the system's versatility.
[0064] Figure 2 This is a flowchart of the login authentication method according to the first embodiment of the present invention. Figure 1 The illustrated embodiment is applicable to scenarios where there is a login-free relationship between the first application and the second application, and specifically includes the following steps:
[0065] Step S101: The first application sends a ticket retrieval request.
[0066] In this embodiment, the first application (AI Agent) itself needs to complete login authentication and possess a legitimate identity. It registers in the login system 5, generating an account and password for itself. The first application submits its account and password information to the login system. After successful verification, the login system returns login credentials to the first application, which can be LoginToken, TGT, AccessToken, etc. When the first application wants to retrieve data from the second application, it sends a ticket retrieval request to the login system. This request includes the identifier of the first application, the identifier of the target application, and the login credentials. The identifier of the target application can be the identifier of the second application or any trusted application.
[0067] Step S102: Log in to the system and send a login ticket.
[0068] In this embodiment, after receiving a ticket retrieval request from the first application, the login system parses the ticket retrieval request to obtain the identifier of the first application, the identifier of the target application, and the login credentials. The login system checks whether the login credentials are valid and have not expired, and checks whether the first application is in the trusted application list. If the login credentials are valid and have not expired, and the first application is in the trusted application list, the login system generates and returns a one-time login ticket, which is a user authorization SSO_TICKET.
[0069] The user-authorized SSO_TICKET is a new type of SSO_TICKET that includes the functionality of the original SSO_TICKET, but supports user confirmation to achieve login exemption after login exemption fails. The original SSO_TICKET is a one-time ticket issued by the login system to the first application, containing three core pieces of information: which user owns the ticket, its validity period, and that it can only be used once. However, if the first application and the second application have not established a login exemption authorization relationship beforehand, the original SSO_TICKET cannot trigger the user confirmation process and fails directly. The user-authorized SSO_TICKET used in this application, however, initiates a user confirmation process to achieve login exemption after login exemption failure.
[0070] Step S103: First application generates link.
[0071] In this embodiment, the first application generates a link based on the login ticket and the second application. Specifically, the first application obtains the link (access address) of the second application, concatenates the obtained login ticket SSO_TICKET with the link of the first application to obtain a new link, and sends the new link to a remote browser to control the remote browser to open the link. In some embodiments, the generated new link also includes query parameters, which are used to indicate the page to be accessed, that is, to indicate which page in the second application needs to be accessed. The login ticket can be added to the query parameters.
[0072] For example, suppose a user tells the first application, "Please check if my expense report from last month has been approved." The first application analyzes the data and finds that the financial system is the second application, located at https: / / bapp.com. The expense report status is on the second application's / expense / approval page, and the SSO_TICKET obtained is ST-123456abcde. The new link generated would then be "https: / / bapp.com / expense / approval?month=last&SSO_TICKET=ST-123456abcde".
[0073] Here, "https: / / bapp.com" is the link to the second application;
[0074] "expense / approval?month=last&SSO_TICKET=ST-123456abcde" is the query parameter.
[0075] "expense / approval?month=last" is the part of the query parameters that indicates the page to access.
[0076] “SSO_TICKET=ST-123456abcde” is the login ticket in the query parameters.
[0077] Step S104: The first application sends an instruction to open the link.
[0078] In this embodiment, the first application sends an open link instruction to the remote browser, which includes the link generated in the previous step.
[0079] Step S105: Open the link in the remote browser.
[0080] In this embodiment, the remote browser opens the link and accesses the second application.
[0081] Step S106: The second application sends the first verification request.
[0082] In this embodiment, after receiving an access request from a remote browser, the second application detects that the link includes a login ticket and sends a first verification request to the login system, wherein the first verification request includes the login ticket.
[0083] Step S107: Log in to the system to confirm the existence of a login-free relationship.
[0084] In this embodiment, the login system receives a first verification request, obtains the login ticket therein, and checks whether the login ticket exists and has not expired, and whether it has been used. If the login ticket exists and has not expired and has not been used, it further checks whether there is a login-free relationship with the requested application.
[0085] Specifically, Figure 3 This is a flowchart illustrating the determination of login-free relationships according to an embodiment of the present invention. Figure 3 As shown, verifying the login-free relationship between the first application and the second application based on the login ticket includes the following steps:
[0086] Step S1071: Determine the first application and the second application based on the login ticket.
[0087] In this embodiment, the first application is determined based on the issuing object corresponding to the login ticket, and the second application is determined based on the first verification request corresponding to the login ticket.
[0088] Step S1072: Detect whether the first application and the second application are pre-set mutually trusted applications.
[0089] In this embodiment, trust configurations for various applications can be performed through the login system, and any two mutually trusted applications can have a login-free relationship. The system detects whether the first and second applications are pre-configured mutually trusted applications.
[0090] If so, proceed to step S1074 to determine that the first application and the second application have a login-free relationship.
[0091] If not, proceed to step S1073.
[0092] Step S1073: Detect whether the user has authorized the first application to access the second application.
[0093] In this embodiment, in response to the fact that the first application and the second application are not pre-set mutually trusted applications, it is detected whether the user has authorized the first application to access the second application. Specifically, if the first application has previously accessed the second application and "automatically allow" was checked during authorization confirmation, it indicates whether the user has authorized the first application to access the second application.
[0094] If so, proceed to step S1074 to determine that the first application and the second application have a login-free relationship.
[0095] If not, proceed to step S1075.
[0096] Step S1074: A login-free relationship exists.
[0097] In this embodiment, in response to the first application and the second application being pre-set mutually trusted applications, it is determined that the first application and the second application have a login-free relationship; or, in response to the user authorizing the first application to access the second application, it is determined that the first application and the second application have a login-free relationship.
[0098] Step S1075: There is no login-free relationship.
[0099] In this embodiment, in response to the fact that the first application and the second application are not pre-set mutually trusted applications, and the user has not authorized the first application to access the second application, it is determined that the first application and the second application do not have a login-free relationship.
[0100] When a login-free relationship is detected between the first application and the second application, proceed to step S108.
[0101] Step S108: Log in to the system and send a verification success message.
[0102] In this embodiment, when the login system detects that there is a login-free relationship between the first application and the second application, it sends a verification success message to the second application.
[0103] Step S109: The second application successfully bypasses login.
[0104] In this embodiment, after receiving the verification success information, the second application generates its own session token (SessionId, JWT, Cookie, etc.), writes it to the browser cookie or returns it to the front end, and saves the user identifier, permissions, expiration time, etc. to the cache or memory to complete the login-free process.
[0105] Step S110: The second application sends feedback information.
[0106] In this embodiment, the second application obtains the data required by the user and generates feedback information to send to the remote browser.
[0107] Step S111: The remote browser sends feedback information.
[0108] In this embodiment, the remote browser sends the received feedback information to the first application, thus completing the first application's access to the second application.
[0109] In this embodiment of the invention, a login center responds to a first application's login authentication by issuing a login ticket to the first application. The first application, based on the login ticket, accesses a second application via a remote browser, receives a first verification request from the second application, and verifies the login-free relationship between the first and second applications based on the login ticket. If a login-free relationship exists between the first and second applications, a verification success message is sent to the second application, enabling successful login-free access for the second application. The first application then accesses data in the second application. If no login-free relationship exists between the first and second applications, the center determines the login state corresponding to the login ticket and executes the login process based on the login state. Therefore, identity verification can be achieved without modifying the target system, improving the system's versatility.
[0110] Figure 4 This is a flowchart of the login authentication method according to the second embodiment of the present invention. Figure 4 The illustrated embodiment is applicable to scenarios where there is no login-free relationship between the first and second applications, but a central login state exists. Specifically, it includes the following steps:
[0111] Step S201: The first application sends a ticket retrieval request.
[0112] Step S202: Log in to the system and send a login ticket.
[0113] Step S203: First application generates link.
[0114] Step S204: The first application sends an instruction to open the link.
[0115] Step S205: Open the link in the remote browser.
[0116] Step S206: The second application sends the first verification request.
[0117] The steps S201-S206 described above can be referred to steps S101-S106, and will not be repeated here in the embodiments of the present invention.
[0118] Step S207: Log in to the system to confirm that there is no login-free relationship.
[0119] In this embodiment, the login system receives a first verification request, obtains the login ticket therein, and checks whether the login ticket exists and has not expired, and whether it has been used. If the login ticket exists and has not expired and has not been used, it further checks whether there is a login-free relationship with the requested application. The specific detection method can be referred to step S107. When it is detected that there is no login-free relationship between the first application and the second application, the system proceeds to step S208.
[0120] Step S208: Log in to the system and send a verification failure message.
[0121] In this embodiment, the login center responds to the fact that there is no login-free relationship between the first application and the second application by sending a verification failure message to the second application.
[0122] Step S209: The second application generates and accesses the first redirect address.
[0123] In this embodiment, after receiving the verification failure information, the second application generates a first redirect address and accesses it. The first redirect address includes a base address and query parameters. The query parameters are used to indicate the access page and include the login ticket.
[0124] Specifically, after receiving the verification failure information, the second application obtains the login address of the login system (e.g., https: / / login-center.com / auth) as the base address, which is the unified authentication entry point for the login system. It then generates query parameters based on the address of the accessed page and the login ticket, and generates and accesses the first redirect address based on the query parameters and the base address. In some embodiments, the second application accesses the first redirect address through the remote browser.
[0125] Step S210: The login system detects a central login status.
[0126] In this embodiment, after receiving an access request, the login system detects the central login status. The detection of the central login status can be implemented in various ways; this embodiment uses Cookie detection as an example. When a second application accesses the unified authentication entry point of the login system, it automatically carries a Cookie. If the login system detects that the Cookie exists, has not expired, and has a correct signature, it considers the central login status to exist.
[0127] Step S211: Log in to the system and send a login token.
[0128] In this embodiment, when the login system detects a central login status, it generates a login token SSO_TOKEN for the second application and redirects the remote browser back to a pre-agreed callback address of the second application via a 302 redirect. That is, the login system sends a 302 response to the remote browser, which includes a redirect address (Location) containing the address of the second application, the accessed page, and the login token. Upon receiving the 302 response, the remote browser automatically accesses the aforementioned redirect address to initiate a request to the second application, and the second application obtains the login token.
[0129] Step S212: The second application sends a second verification request.
[0130] In this embodiment, after receiving a request from a remote browser, the second application sends second verification information to the login system, the second verification information including the login token.
[0131] Step S213: Log in to the system and send a verification success message.
[0132] In this embodiment, after receiving the second verification request, the login system verifies the login token. If the verification is successful, it sends a verification success message to the second application.
[0133] Step S214: The second application successfully bypasses login.
[0134] In this embodiment, after receiving the verification success information, the second application generates its own session token (SessionId, JWT, Cookie, etc.), writes it to the browser cookie or returns it to the front end, and saves the user identifier, permissions, expiration time, etc. to the cache or memory to complete the login-free process.
[0135] Step S215: The second application sends feedback information.
[0136] In this embodiment, the second application obtains the data required by the user and generates feedback information to send to the remote browser.
[0137] Step S216: The remote browser sends feedback information.
[0138] In this embodiment, the remote browser sends the received feedback information to the first application, thus completing the first application's access to the second application.
[0139] It should be noted that if the login state of the center encounters risk control returning a second authentication, application-mandated second authentication, or a public account requiring identity selection, no special handling will be done, and the user needs to complete the relevant operations themselves.
[0140] In this embodiment of the invention, a login center responds to a first application's login authentication by issuing a login ticket to the first application. The first application, based on the login ticket, accesses a second application via a remote browser, receives a first verification request from the second application, and verifies the login-free relationship between the first and second applications based on the login ticket. If a login-free relationship exists between the first and second applications, a verification success message is sent to the second application, enabling successful login-free access for the second application. The first application then accesses data in the second application. If no login-free relationship exists between the first and second applications, the center determines the login state corresponding to the login ticket and executes the login process based on the login state. Therefore, identity verification can be achieved without modifying the target system, improving the system's versatility.
[0141] Figure 5 This is a flowchart of the login authentication method according to the third embodiment of the present invention. Figure 5 The illustrated embodiment is applicable to scenarios where there is no login-free relationship between the first and second applications, no central login state, and the authorization type is pending authorization. Specifically, it includes the following steps:
[0142] Step S301: The first application sends a ticket retrieval request.
[0143] Step S302: Log in to the system and send a login ticket.
[0144] Step S303: First application generates link.
[0145] Step S304: The first application sends an instruction to open the link.
[0146] Step S305: Open the link in the remote browser.
[0147] Step S306: The second application sends the first verification request.
[0148] Step S307: Log in to the system to confirm that there is no login-free relationship.
[0149] Step S308: Log in to the system and send a verification failure message.
[0150] Step S309: The second application generates and accesses the first redirect address.
[0151] The above steps S301-S309 can be referred to steps S201-209, and will not be repeated here in the embodiments of the present invention.
[0152] Step S310: The login system detected a central login state.
[0153] Step S311: Log in to the system and send a redirection response.
[0154] In this embodiment, the login system detects a decentralized login state, and that the SSO_TICKET used for this login is a "user-authorized SSO_TICKET", and sends a redirection response to the remote browser. The redirection response includes the waiting access address and query parameters.
[0155] Step S312: The remote browser generates a second redirect address and accesses it.
[0156] In this embodiment, the remote browser is used to generate and access a second redirect address based on the redirect response. The second redirect address includes a waiting access address, query parameters, and a login ticket.
[0157] Step S313: Log in to the system and confirm that the authorization type is pending authorization.
[0158] In this embodiment, when the login system receives an access request from a remote browser, it determines that the authorization type is pending authorization.
[0159] Step S314: Log in to the system and send a waiting authorization response.
[0160] In this embodiment, the login system sends a pending authorization response to the remote browser, causing the remote browser to display a pending authorization page. The pending authorization page prompts the user to confirm authorization.
[0161] Step S315: The remote browser and login system poll the authorization status.
[0162] In this embodiment, if the user or the backend administrator has already authorized the first application to access the second application in the remote browser, the remote browser can automatically authorize it without requiring further user confirmation.
[0163] It should be noted that login tickets are required during the polling process. Since login tickets are one-time use only, they need to be continuously updated during the polling process.
[0164] Step S316: Log in to the system and confirm that the authorization status is authorized.
[0165] In this embodiment, if the login system obtains authorization from the remote browser, the authorization status is determined to be authorized.
[0166] Step S317: Log in to the system and send an authorized response.
[0167] In this embodiment, the login system responds to the authorization status as authorized by generating an authorized response and sending it to the remote browser. The authorized response includes the authorization status and a third redirect address, which includes the access address of the second application and the login ticket.
[0168] In some embodiments, the authorized response includes a complete access address, which includes the access address of the second application and query parameters, the query parameters including the address of the access page and the login ticket.
[0169] Step S318: Open the link in the remote browser.
[0170] In this embodiment, the remote browser opens the link in the authorized response.
[0171] Step S319: The second application sends a third verification request.
[0172] In this embodiment, the second application sends a third verification request to the login system, the third verification request including the login ticket.
[0173] Step S320: Log in to the system and send a verification success message.
[0174] In this embodiment, after receiving the third verification request, the login system verifies the login ticket. If the verification is successful, the login system sends a verification success message to the second application.
[0175] Step S321: The second application sends feedback information.
[0176] In this embodiment, after receiving the successful verification information, the second application generates its own session token (SessionId, JWT, Cookie, etc.), writes it to the browser cookie or returns it to the front end, and simultaneously saves the user identifier, permissions, expiration time, etc., to the cache or memory to complete the login-free process. At the same time, the second application obtains the data required by the user and generates feedback information to send to the remote browser.
[0177] Step S322: The remote browser sends feedback information.
[0178] In this embodiment, the remote browser sends the received feedback information to the first application, thus completing the first application's access to the second application.
[0179] In this embodiment of the invention, a login center responds to a first application's login authentication by issuing a login ticket to the first application. The first application, based on the login ticket, accesses a second application via a remote browser, receives a first verification request from the second application, and verifies the login-free relationship between the first and second applications based on the login ticket. If a login-free relationship exists between the first and second applications, a verification success message is sent to the second application, enabling successful login-free access for the second application. The first application then accesses data in the second application. If no login-free relationship exists between the first and second applications, the center determines the login state corresponding to the login ticket and executes the login process based on the login state. Therefore, identity verification can be achieved without modifying the target system, improving the system's versatility.
[0180] Figure 6 This is a flowchart of the login authentication method according to the fourth embodiment of the present invention. Figure 6 The illustrated embodiment is applicable to scenarios where there is no login-free relationship between the first and second applications, no central login state, and the authorization type is confirmation authorization. Specifically, it includes the following steps:
[0181] Step S401: The first application sends a ticket retrieval request.
[0182] Step S402: Log in to the system and send a login ticket.
[0183] Step S403: First application generates link.
[0184] Step S404: The first application sends an instruction to open the link.
[0185] Step S405: Open the link in the remote browser.
[0186] Step S406: The second application sends the first verification request.
[0187] Step S407: Log in to the system to confirm that there is no login-free relationship.
[0188] Step S408: Log in to the system and send a verification failure message.
[0189] Step S409: The second application generates and accesses the first redirect address.
[0190] Step S410: The login system detected a central login state.
[0191] Step S411: Log in to the system and send a redirection response.
[0192] Step S412: The remote browser generates a second redirect address and accesses it.
[0193] Step S413: Log in to the system and confirm that the authorization type is pending authorization.
[0194] Step S414: Log in to the system and send a waiting authorization response.
[0195] The above steps S401-S414 can be referred to steps S301-S314, and will not be repeated here in the embodiments of the present invention.
[0196] Step S415: The remote browser and login system poll the authorization status.
[0197] In this embodiment, if the user or the backend administrator has already authorized the first application to access the second application in the remote browser, the remote browser can automatically authorize access without requiring further user confirmation. If the remote browser has not authorized the first application to access the second application, it cannot automatically authorize access, and a confirmation authorization process is required.
[0198] Step S416: The remote browser sends a redirect response.
[0199] In this embodiment, while the authorization waiting process is being executed as described above, the remote browser sends a redirection response to the first application.
[0200] Step S417: Open the link in the first application.
[0201] In this embodiment, as described above, the redirection response includes a waiting access address and query parameters. The local browser is used by the first application to generate a fourth redirection address based on the redirection response.
[0202] Step S418: The local browser accesses the fourth redirect address.
[0203] In this embodiment, the first application controls the local browser to access the fourth redirect address, which includes a waiting access address, query parameters, and login ticket.
[0204] Step S419: Log in to the system and confirm the authorization type as authorization confirmation.
[0205] In this embodiment, the login system verifies the login ticket, and in response to the login ticket being valid, determines the authorization type as confirmation authorization.
[0206] Step S420: Log in to the system and send a confirmation authorization response.
[0207] In this embodiment, the login system sends an authorization confirmation response to the local browser.
[0208] Step S421: The local browser sends a confirmation message.
[0209] In this embodiment, after receiving the authorization confirmation response, the near-end browser displays an authorization confirmation interface. The authorization confirmation interface includes "Confirm" and "Reject" controls. When the "Confirm" control is clicked, the near-end browser sends confirmation information to the login system.
[0210] Step S422: Log in to the system and confirm that the authorization status is authorized.
[0211] In this embodiment, if the login system obtains confirmation information from the local browser, the authorization status is determined to be authorized.
[0212] Step S423: Log in to the system and send an authorized response.
[0213] In this embodiment, the login system responds to the authorization status being authorized by generating an authorized response and sending it to the remote browser. The authorized response includes the authorization status and a fifth redirect address. The fifth redirect address includes the access address of the second application and the login ticket, so that the remote browser can access the second application.
[0214] In some embodiments, the authorized response includes a complete access address, which includes the access address of the second application and query parameters, the query parameters including the address of the access page and the login ticket.
[0215] Step S424: Open the link in the remote browser.
[0216] In this embodiment, the remote browser opens the link in the authorized response.
[0217] Step S425: The second application sends a fourth verification request.
[0218] In this embodiment, the second application sends a fourth verification request to the login system, the fourth verification request including the login ticket.
[0219] Step S426: Log in to the system and send a verification success message.
[0220] In this embodiment, after receiving the fourth verification request, the login system verifies the login ticket. If the verification is successful, the login system sends a verification success message to the second application.
[0221] Step S427: The second application sends feedback information.
[0222] In this embodiment, after receiving the successful verification information, the second application generates its own session token (SessionId, JWT, Cookie, etc.), writes it to the browser cookie or returns it to the front end, and simultaneously saves the user identifier, permissions, expiration time, etc., to the cache or memory to complete the login-free process. At the same time, the second application obtains the data required by the user and generates feedback information to send to the remote browser.
[0223] Step S428: The remote browser sends feedback information.
[0224] In this embodiment, the remote browser sends the received feedback information to the first application, thus completing the first application's access to the second application.
[0225] Considering the cost of implementing login-free inter-application systems, a large number of target applications would require modification if the standard OAuth scheme were followed. This invention, however, incorporates existing application-supported capabilities, namely, the ability to verify and log in-free SSO_TICKETs issued by the login system. By modifying and upgrading the existing login process of the login system, it implements the interaction logic of waiting for authorization and confirming authorization, completing the application login-free process through user login confirmation. Ultimately, this enables the AI Agent application to access the target application's data without login. Simultaneously, by designing a separate path for BrowserUse to detect the waiting authorization, the steps are simplified; the access party only needs to obtain the corresponding link and open it in a user-operable interface, making the integration solution simple. Furthermore, integrating login-free authorization between applications into ordinary login scenarios, distinguishing whether authorization is supported based on the generated credentials, minimizes data intrusion and impacts the main login process. Providing a fixed URL path for the calling application to determine whether it is an authorization process, and automatically converting the URL to a confirmation authorization interface when opened in a user-operable interface, the AIAgent application only needs to perform two steps: detection and opening, simplifying the logic.
[0226] In this embodiment of the invention, a login center responds to a first application's login authentication by issuing a login ticket to the first application. The first application, based on the login ticket, accesses a second application via a remote browser, receives a first verification request from the second application, and verifies the login-free relationship between the first and second applications based on the login ticket. If a login-free relationship exists between the first and second applications, a verification success message is sent to the second application, enabling successful login-free access for the second application. The first application then accesses data in the second application. If no login-free relationship exists between the first and second applications, the center determines the login state corresponding to the login ticket and executes the login process based on the login state. Therefore, identity verification can be achieved without modifying the target system, improving the system's versatility.
[0227] Figure 7This is a flowchart of the login authentication method according to the fifth embodiment of the present invention. Figure 7 As shown, the login authentication method of this invention is applied to a login system and includes the following steps:
[0228] Step S510: In response to the first application completing login authentication, a login ticket is issued to the first application, and the first application accesses the second application through a remote browser based on the login ticket.
[0229] Step S520: Receive a first verification request sent by the second application, the first verification request including the login ticket, and verify the login-free relationship between the first application and the second application based on the login ticket.
[0230] Step S530: In response to the fact that the first application and the second application have a login-free relationship, a verification success message is sent to the second application so that the second application can successfully log in without login, and the first application can access the data of the second application.
[0231] Step S540: In response to the absence of a login-free relationship between the first application and the second application, determine the central login status corresponding to the login ticket.
[0232] Step S550: Execute the login process according to the central login status.
[0233] In some embodiments, verifying the login-free relationship between the first application and the second application based on the login ticket includes:
[0234] The first application and the second application are determined based on the login ticket;
[0235] Detect whether the first application and the second application are pre-set mutually trusted applications;
[0236] In response to the fact that the first application and the second application are pre-set mutually trusted applications, it is determined that the first application and the second application have a login-free relationship;
[0237] In response to the fact that the first application and the second application are not pre-set mutually trusted applications, detect whether the user has authorized the first application to access the second application;
[0238] In response to the user's authorization to access the second application from the first application, it is determined that the first application and the second application have a login-free relationship.
[0239] In some embodiments, the method includes:
[0240] In response to the absence of a login-free relationship between the first application and the second application, a verification failure message is sent to the second application. After receiving the verification failure message, the second application generates a first redirect address and accesses it. The first redirect address includes a base address and query parameters. The query parameters are used to indicate the access page and include the login ticket.
[0241] In some embodiments, the step of executing the login process based on the central login status includes:
[0242] In response to the detection of a central login status, a login token is generated and sent to the second application;
[0243] Receive a second verification request sent by the second application, the second verification request including the login token;
[0244] Verify the login token;
[0245] Upon successful verification, a verification success message is sent to the second application, enabling the second application to access the data of the second application without logging in.
[0246] In some embodiments, the step of executing the login process based on the central login status includes:
[0247] In response to the detection that no central login state exists and that the login ticket is a user-authorized login ticket, a redirection response is sent to the remote browser. The redirection response includes a waiting access address and query parameters. The remote browser is used to generate a second redirection address based on the redirection response and access it. The second redirection address includes a waiting access address, query parameters, and a login ticket.
[0248] In response to receiving an access request from the remote browser, the login ticket is verified;
[0249] In response to the login ticket being valid, the authorization type is determined to be pending authorization;
[0250] Send a waiting authorization response to the remote browser, and the remote browser responds that the user has completed authorization and authorizes the login.
[0251] Polling for authorization status;
[0252] In response to the authorization status being authorized, an authorized response is generated and sent to the remote browser. The authorized response includes the authorization status and a third redirect address. The third redirect address includes the access address of the second application and the login ticket, so that the remote browser can access the second application.
[0253] Receive a third verification request sent by the second application, the third verification request including the login ticket;
[0254] Verify the login ticket;
[0255] Upon successful verification, a verification success message is sent to the second application, enabling the second application to access the data of the second application without logging in.
[0256] In some embodiments, the step of executing the login process based on the central login status further includes:
[0257] In response to receiving an access request from the local browser, the login ticket is verified. The first application obtains the redirection response from the local browser. The redirection response includes a waiting access address and query parameters. The first application generates a fourth redirection address based on the redirection response through the local browser and accesses it. The fourth redirection address includes a waiting access address, query parameters, and a login ticket.
[0258] In response to the login ticket being valid, the authorization type is determined to be confirmation authorization;
[0259] Send a confirmation authorization response to the local browser so that the local browser displays the confirmation authorization page;
[0260] In response to receiving confirmation information from the near-end browser, the authorization status is updated to authorized, and the confirmation information is entered by the user through the authorization confirmation page;
[0261] An authorized response is generated and sent to the remote browser. The authorized response includes an authorization status and a fifth redirect address. The fifth redirect address includes the access address of the second application and the login ticket, so that the remote browser can access the second application.
[0262] Receive a fourth verification request sent by the second application, the fourth verification request including the login ticket;
[0263] Verify the login ticket;
[0264] Upon successful verification, a verification success message is sent to the second application, enabling the second application to access the data of the second application without logging in.
[0265] In this embodiment of the invention, a login center responds to a first application's login authentication by issuing a login ticket to the first application. The first application, based on the login ticket, accesses a second application via a remote browser, receives a first verification request from the second application, and verifies the login-free relationship between the first and second applications based on the login ticket. If a login-free relationship exists between the first and second applications, a verification success message is sent to the second application, enabling successful login-free access for the second application. The first application then accesses data in the second application. If no login-free relationship exists between the first and second applications, the center determines the login state corresponding to the login ticket and executes the login process based on the login state. Therefore, identity verification can be achieved without modifying the target system, improving the system's versatility.
[0266] Figure 8 This is a schematic diagram of a login authentication device according to an embodiment of the present invention. Figure 8 As shown, the login authentication device of this embodiment is applied to a login system, including a ticket issuing unit 81, a first receiving unit 82, a verification success information sending unit 83, a central login state determination unit 84, and a login process execution unit 85. The ticket issuing unit 81 issues a login ticket to the first application in response to the first application completing login authentication, and the first application accesses a second application through a remote browser based on the login ticket. The first receiving unit 82 receives a first verification request sent by the second application, the first verification request including the login ticket, and verifies the login-free relationship between the first application and the second application based on the login ticket. The verification success information sending unit 83 sends verification success information to the second application in response to the existence of a login-free relationship between the first application and the second application, so that the second application can successfully log in without login, and the first application can access the data of the second application. The central login state determination unit 84 determines the central login state corresponding to the login ticket in response to the absence of a login-free relationship between the first application and the second application. The login process execution unit 85 executes the login process based on the central login state.
[0267] In this embodiment of the invention, a login center responds to a first application's login authentication by issuing a login ticket to the first application. The first application, based on the login ticket, accesses a second application via a remote browser, receives a first verification request from the second application, and verifies the login-free relationship between the first and second applications based on the login ticket. If a login-free relationship exists between the first and second applications, a verification success message is sent to the second application, enabling successful login-free access for the second application. The first application then accesses data in the second application. If no login-free relationship exists between the first and second applications, the center determines the login state corresponding to the login ticket and executes the login process based on the login state. Therefore, identity verification can be achieved without modifying the target system, improving the system's versatility.
[0268] Figure 9 This is a schematic diagram of an electronic device according to an embodiment of the present invention. In this embodiment, the electronic device 9 includes a server, a terminal, etc. Figure 9 As shown, the electronic device 9 includes at least one processor 91; a memory 92 communicatively connected to at least one processor 91; and a communication component 93 communicatively connected to a scanning device, the communication component 93 receiving and sending data under the control of the processor 91; wherein the memory 92 stores instructions executable by at least one processor 91, the instructions being executed by at least one processor 91 to implement the above-described login authentication method.
[0269] Specifically, the electronic device includes: one or more processors 91 and a memory 92. Figure 9 Taking a processor 91 as an example, the processor 91 and the memory 92 can be connected via a bus or other means. Figure 9 Taking a bus connection as an example, memory 92, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Processor 91 executes various functional applications and data processing of the device by running the non-volatile software programs, instructions, and modules stored in memory 92, thereby implementing the aforementioned login authentication method.
[0270] The memory 92 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; the data storage area may store an option list, etc. Furthermore, the memory 92 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 92 may optionally include memory remotely located relative to the processor 91, and these remote memories may be connected to external devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0271] One or more modules are stored in memory 92 and, when executed by one or more processors 91, execute the login authentication method in any of the above method embodiments.
[0272] The above-mentioned products can perform the methods provided in the embodiments of this application, and have the corresponding functional modules and beneficial effects of performing the methods. For technical details not described in detail in this embodiment, please refer to the methods provided in the embodiments of this application.
[0273] In this embodiment of the invention, a login center responds to a first application's login authentication by issuing a login ticket to the first application. The first application, based on the login ticket, accesses a second application via a remote browser, receives a first verification request from the second application, and verifies the login-free relationship between the first and second applications based on the login ticket. If a login-free relationship exists between the first and second applications, a verification success message is sent to the second application, enabling successful login-free access for the second application. The first application then accesses data in the second application. If no login-free relationship exists between the first and second applications, the center determines the login state corresponding to the login ticket and executes the login process based on the login state. Therefore, identity verification can be achieved without modifying the target system, improving the system's versatility.
[0274] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program for use by a computer to execute some or all of the above-described method embodiments.
[0275] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0276] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A login authentication method, applied to a login system, characterized in that, The method includes: In response to the first application completing login authentication, a login ticket is issued to the first application, and the first application accesses the second application through a remote browser based on the login ticket; The system receives a first verification request sent by a second application, the first verification request including the login ticket; determines the first application and the second application based on the login ticket; detects whether the first application and the second application are pre-set mutually trusted applications; and detects whether the user authorizes the first application to access the second application, so as to verify the login-free relationship between the first application and the second application. In response to the fact that the first application and the second application have a login-free relationship, a verification success message is sent to the second application so that the second application can successfully log in without login, and the first application can access the data of the second application; In response to the absence of a login-free relationship between the first application and the second application, the central login status corresponding to the login ticket is determined; The login process is executed based on the central login status.
2. The method according to claim 1, characterized in that, The step of detecting whether a user has authorized the first application to access the second application, in order to verify the login-free relationship between the first application and the second application, includes: Since the first application and the second application are pre-set mutually trusted applications, it is determined that the first application and the second application have a login-free relationship. In response to the fact that the first application and the second application are not pre-set mutually trusted applications, the system detects whether the user has authorized the first application to access the second application. In response to the user's authorization to access the second application from the first application, it is determined that the first application and the second application have a login-free relationship.
3. The method according to claim 1, characterized in that, The method includes: In response to the absence of a login-free relationship between the first application and the second application, a verification failure message is sent to the second application. After receiving the verification failure message, the second application generates a first redirect address and accesses it. The first redirect address includes a base address and query parameters. The query parameters are used to indicate the access page and include the login ticket.
4. The method according to claim 3, characterized in that, The process of executing the login procedure based on the central login status includes: In response to the detection of a central login status, a login token is generated and sent to the second application; Receive a second verification request sent by the second application, the second verification request including the login token; Verify the login token; Upon successful verification, a verification success message is sent to the second application, enabling the second application to access the data of the second application without logging in.
5. The method according to claim 3, characterized in that, The process of executing the login procedure based on the central login status includes: In response to the detection that no central login state exists and that the login ticket is a user-authorized login ticket, a redirection response is sent to the remote browser. The redirection response includes a waiting access address and query parameters. The remote browser is used to generate a second redirection address based on the redirection response and access it. The second redirection address includes a waiting access address, query parameters, and a login ticket. In response to receiving an access request from the remote browser, the login ticket is verified; In response to the login ticket being valid, the authorization type is determined to be pending authorization; Send a waiting authorization response to the remote browser, and the remote browser responds that the user has completed authorization and authorizes the login; Polling for authorization status; In response to the authorization status being authorized, an authorized response is generated and sent to the remote browser. The authorized response includes the authorization status and a third redirect address. The third redirect address includes the access address of the second application and the login ticket, so that the remote browser can access the second application. Receive a third verification request sent by the second application, the third verification request including the login ticket; Verify the login ticket; Upon successful verification, a verification success message is sent to the second application, enabling the second application to access the data of the second application without logging in.
6. The method according to claim 5, characterized in that, The step of executing the login process based on the central login status also includes: In response to receiving an access request from the local browser, the login ticket is verified. The first application obtains the redirection response from the local browser. The redirection response includes a waiting access address and query parameters. The first application generates a fourth redirection address based on the redirection response through the local browser and accesses it. The fourth redirection address includes a waiting access address, query parameters, and a login ticket. In response to the login ticket being valid, the authorization type is determined to be confirmation authorization; Send a confirmation authorization response to the local browser so that the local browser displays the confirmation authorization page; In response to receiving confirmation information from the near-end browser, the authorization status is updated to authorized, and the confirmation information is entered by the user through the authorization confirmation page; An authorized response is generated and sent to the remote browser. The authorized response includes an authorization status and a fifth redirect address. The fifth redirect address includes the access address of the second application and the login ticket, so that the remote browser can access the second application. Receive a fourth verification request sent by the second application, the fourth verification request including the login ticket; Verify the login ticket; Upon successful verification, a verification success message is sent to the second application, enabling the second application to access the data of the second application without logging in.
7. A login authentication system, characterized in that, The login authentication system includes a first application, a second application, a remote browser, a local browser, and a login system; After the first application completes login authentication, the login system issues a login ticket to the first application, and the first application accesses the second application through a remote browser based on the login ticket; The login system receives a first verification request sent by the second application. The first verification request includes the login ticket. Based on the login ticket, the system determines the first application and the second application, detects whether the first application and the second application are pre-set mutually trusted applications, and detects whether the user authorizes the first application to access the second application, so as to verify the login-free relationship between the first application and the second application. When the login system responds to the existence of a login-free relationship between the first application and the second application, it sends a verification success message to the second application, enabling the second application to successfully log in without login, and the first application accesses the data of the second application; when the login system responds to the existence of a login-free relationship between the first application and the second application, it determines the central login state corresponding to the login ticket and executes the login process according to the central login state.
8. The login authentication system according to claim 7, characterized in that, The login system determines that the first application and the second application have a login-free relationship if the first application and the second application are pre-set mutually trusted applications. If the first application and the second application are not pre-set mutually trusted applications, the system detects whether the user has authorized the first application to access the second application. If the user has authorized the first application to access the second application, the system determines that the first application and the second application have a login-free relationship.
9. The login authentication system according to claim 7, characterized in that, The login system responds to the fact that there is no login-free relationship between the first application and the second application by sending a verification failure message to the second application; After receiving the verification failure information, the second application generates a first redirect address and accesses it. The first redirect address includes a base address and query parameters. The query parameters are used to indicate the access page and include the login ticket.
10. The login authentication system according to claim 9, characterized in that, In response to detecting the presence of a central login state, the login system generates a login token and sends it to the second application. In response to receiving the login token, the second application sends a second verification request to the login system, the second verification request including the login token; The login system verifies the login token, and in response to successful verification, sends a verification success message to the second application, enabling the second application to access the data of the second application without logging in.
11. The login authentication system according to claim 9, characterized in that, In response to detecting the absence of a central login state and that the login ticket is a user-authorized login ticket, the login system sends a redirection response to the remote browser. The redirection response includes the waiting access address and query parameters. The remote browser is used to generate a second redirect address based on the redirect response and access it. The second redirect address includes a waiting access address, query parameters, and a login ticket. The login system, upon receiving an access request from the remote browser, verifies the login ticket. If the login ticket is valid, it determines the authorization type to be pending authorization and sends a pending authorization response to the remote browser. The remote browser responds to the user's confirmation of authorization and authorizes the login. The login system polls the authorization status, which includes waiting for authorization and authorized status. In response to the authorization status being authorized, an authorized response is generated and sent to the remote browser. The authorized response includes the authorization status and a third redirect address. The third redirect address includes the access address of the second application and the login ticket. The remote browser accesses the second application based on the authorized response; The second application sends a third verification request to the login system, the third verification request including the login ticket; The login system receives a third verification request sent by the second application, verifies the login ticket, and sends a verification success message to the second application in response to successful verification, so that the second application can successfully log in without login and the first application can access the data of the second application.
12. The login authentication system according to claim 11, characterized in that, The first application obtains the redirect response from the local browser. The redirect response includes a waiting access address and query parameters. The local browser generates a fourth redirect address based on the redirect response and accesses it. The fourth redirect address includes a waiting access address, query parameters, and a login ticket. The login system, upon receiving an access request from the local browser, verifies the login ticket. If the login ticket is valid, it determines the authorization type to be confirmation authorization and sends a confirmation authorization response to the local browser. The near-end browser displays a confirmation authorization page, and in response to receiving confirmation information entered by the user through the confirmation authorization page, sends the confirmation information to the login system; Upon receiving confirmation information from the near-end browser, the login system updates the authorization status to authorized, generates an authorized response, and sends it to the remote browser. The authorized response includes the authorization status and a fifth redirect address, which includes the access address of the second application and the login ticket. The remote browser accesses the second application based on the authorized response; The second application sends a fourth verification request to the login system, the fourth verification request including the login ticket; the login system verifies the login ticket, and in response to successful verification, sends a verification success message to the second application, so that the second application can successfully log in without login, and the first application can access the data of the second application.
13. A login authentication device, applied to a login system, characterized in that, The device includes: The ticket issuing unit is used to issue a login ticket to the first application in response to the first application completing login authentication, and the first application accesses the second application through a remote browser based on the login ticket. The first receiving unit is configured to receive a first verification request sent by the second application, the first verification request including the login ticket, determine the first application and the second application based on the login ticket, detect whether the first application and the second application are pre-set mutually trusted applications, and detect whether the user authorizes the first application to access the second application, so as to verify the login-free relationship between the first application and the second application. The verification success information sending unit is used to send verification success information to the second application in response to the existence of a login-free relationship between the first application and the second application, so that the second application can successfully log in without login and the first application can access the data of the second application; A central login status determination unit is used to determine the central login status corresponding to the login ticket in response to the absence of a login-free relationship between the first application and the second application. The login process execution unit is used to execute the login process according to the central login status.
14. An electronic device comprising a memory and a processor, characterized in that, The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Single sign-on method and system
CN103414684A
Identity authentication method for mutual-trust application systems
CN104580184A
