A decoupled configurable single sign-on method and system
By configuring HTML routing and user ticket verification logic, a decoupled and configurable single sign-on is achieved, solving the problems of cross-platform compatibility and large workload of transformation, and improving user experience and system security.
Patent Information
- Application Number
- CN202410875678.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-07-02
AI Technical Summary
Existing technologies face challenges in achieving single sign-on across multiple independent systems, including cross-platform compatibility, compatibility issues, and significant modification workload. Furthermore, it is difficult to achieve a loosely coupled design to ensure system stability and maintainability.
By configuring HTML routing and user ticket verification logic, a decoupled and configurable single sign-on method is implemented, including login ticket acquisition, ticket validity verification, and page redirection, reducing dependencies between systems.
It enables single sign-on functionality across different systems, improving user efficiency and experience, enhancing system security, and providing flexibility and scalability.
Smart Images

Figure CN118573463B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network information software, in particular to a decoupled configurable single sign-on method and system. BACKGROUND
[0002] With the rapid development of information systems, different departments within modern enterprises, institutions or organizations often use multiple independent software systems to meet their specific workflow and business needs. These systems usually have their own independent user management modules and permission authentication methods, resulting in the need for users to frequently enter account numbers and passwords to log in when accessing different systems, greatly reducing work efficiency and increasing the risk of password management.
[0003] To solve this problem, Single Sign-On (SSO) technology has emerged. Single sign-on technology allows users to access multiple independent systems through a single login and authentication process, without the need to repeatedly enter account numbers and passwords in each system. This not only improves user efficiency and experience, but also helps reduce the risk of password leakage and enhances system security.
[0004] However, when implementing single sign-on between multiple independent systems, some challenges may be encountered. First, different systems may use different technical architectures and development languages, which requires the single sign-on solution to have good cross-platform and compatibility. Second, since the original user management and permission authentication methods of each system are relatively mature and stable, when implementing single sign-on, the amount of modification and development work on the original system should be minimized to maintain system stability and maintainability. Finally, the single sign-on solution should implement a low-coupling design, i.e. the dependency between systems should be minimized so that when a system fails or upgrades, it will not have a significant impact on other systems. SUMMARY
[0005] The purpose of the present application is to provide a decoupled configurable single sign-on method and system to solve the problems raised in the background art.
[0006] To achieve the above purpose, the present application provides the following technical solution: a decoupled configurable single sign-on method, the method comprising the following steps:
[0007] Successfully logging into A system, configuring HTML routing in A system and obtaining user login ticket;
[0008] Including A system user ticket legality verification logic in HTML;
[0009] Including B system user ticket legality verification logic in HTML;
[0010] The HTML implements the page jump between different systems.
[0011] Preferably, the specific operations of successfully logging in the A system, configuring the HTML route in the A system, and obtaining the user login ticket include:
[0012] The user inputs the account and password, and the user inputs the correct account and password in the login interface of the A system;
[0013] The account and password are verified, and the A system verifies the account and password input by the user to ensure the authenticity and legality of the user identity;
[0014] The login ticket is generated, and after the verification is passed, the A system generates a unique login ticket token for the user, which will serve as the unique identifier of the user identity;
[0015] The route is configured and jumped, and the A system redirects the user to the specified HTML page according to the preset route rule, and passes the login ticket as a parameter to the page during the jump process.
[0016] Preferably, the specific operations of including the A system user ticket legality verification logic in the HTML include:
[0017] The login ticket is obtained, and when the HTML page is loaded, the A system login ticket token is obtained from the specific parameter of the URL, the local storage or other specified location;
[0018] The verification interface is called, and the HTML page calls the verification interface provided by the A system through Ajax, and passes the obtained login ticket as a request parameter to the interface;
[0019] The ticket legality is verified, and the verification interface of the A system verifies the incoming login ticket to ensure that the ticket is real and valid and belongs to the current user;
[0020] The verification result is processed, and according to the result returned by the verification interface, the HTML page performs corresponding operations, if the verification is successful, the user is allowed to continue to access the page; if the verification fails, the user is prompted to log in again or other processing is performed.
[0021] Preferably, the specific operations of including the B system user ticket legality verification logic in the HTML include:
[0022] The current user information is obtained, and after the A system login ticket verification is successful, the HTML page further obtains the detailed information of the current user from the A system;
[0023] The B system login interface is called, and the obtained user information is used as a parameter. The HTML page calls the login interface provided by the B system for verification, and sends the encrypted user information to the B system server for verification.
[0024] The B system verification result is processed. According to the result returned by the B system login interface, the HTML page performs corresponding operations. If the verification is successful, it indicates that the user has successfully logged in the B system. If the verification fails, the user needs to re-enter the account and password in the B system for login or perform other processing.
[0025] Preferably, the specific operation of the HTML for realizing the page jump between different systems includes:
[0026] Waiting for the B system verification result, after calling the B system login interface, the HTML page waits for the return result of the interface;
[0027] Judging the verification result, as soon as the B system verification result is received, the HTML page immediately judges whether the result indicates that the verification is successful;
[0028] Realizing page jump, if the verification is successful, the page automatically redirects the user to the related page of the B system according to the preset jump rule or the jump instruction returned by the B system; if the verification fails, the page will prompt the user that the login fails and give corresponding processing suggestions, such as re-login and checking network connection.
[0029] A decoupled configurable single sign-on system, the system is composed of a login ticket acquisition module, a first ticket legality verification module, a second ticket legality verification module and a page jump module;
[0030] The login ticket acquisition module successfully logs in the A system, configures the HTML route in the A system and acquires the user login ticket;
[0031] The first ticket legality verification module includes the A system user ticket legality verification logic in the HTML;
[0032] The second ticket legality verification module includes the B system user ticket legality verification logic in the HTML;
[0033] The page jump module realizes the page jump between different systems in the HTML.
[0034] Preferably, the login ticket acquisition module, the user inputs the account and password, and the user inputs the correct account and password in the login interface of the A system;
[0035] Verify the account and password, the A system verifies the account and password input by the user to ensure the authenticity and legality of the user's identity;
[0036] Generating a login ticket, after verification, the A system generates a unique login ticket token for the user, which will serve as the unique identifier of the user's identity;
[0037] Configure routing and jump, A system according to the preset routing rules, the user is redirected to the designated HTML page, and the login ticket is passed as a parameter to the page during the jump process.
[0038] Preferably, the first ticket legality verification module obtains the login ticket, and when the HTML page is loaded, attempts to obtain the A system login ticket token from the specific parameters of the URL, local storage or other specified locations;
[0039] Call the verification interface, the HTML page calls the verification interface provided by the A system through Ajax, and passes the obtained login ticket as a request parameter to the interface;
[0040] Verify the legality of the ticket, the verification interface of the A system verifies the incoming login ticket to ensure that the ticket is real and valid and belongs to the current user;
[0041] Handle the verification result, according to the result returned by the verification interface, the HTML page performs corresponding operations, if the verification is successful, the user is allowed to continue to access the page; if the verification fails, the user is prompted to log in again or other processing.
[0042] Preferably, the second ticket legality verification module obtains the current user information, after the A system's login ticket verification is successful, the HTML page further obtains the detailed information of the current user from the A system;
[0043] Call the B system login interface, use the obtained user information as a parameter, the HTML page calls the login interface provided by the B system for verification, and sends the encrypted user information to the B system server for verification;
[0044] Handle the B system verification result, according to the result returned by the B system login interface, the HTML page executes corresponding operations; if the verification is successful, it indicates that the user has successfully logged in to the B system; if the verification fails, the user needs to log in again in the B system or other processing.
[0045] Preferably, the page jump module waits for the B system verification result, after calling the B system login interface, the HTML page waits for the return result of the interface;
[0046] Judge the verification result, as soon as the B system verification result is received, the HTML page immediately judges whether the result indicates that the verification is successful;
[0047] Realize page jump, if the authentication is successful, the page is automatically redirected to the related page of the B system according to the preset jump rule or the jump instruction returned by the B system;If the authentication fails, the page will prompt the user that the login fails and give the corresponding processing suggestion, re-login, check the network connection.
[0048] Compared with the prior art, the beneficial effects of the present application are:
[0049] The decoupled configurable single sign-on method and system provided by the present application realize the single sign-on function between different systems by configuring HTML routing and user ticket verification logic. At the same time, this method also has high flexibility and scalability, and can be customized and optimized according to specific needs. By introducing this method, enterprises, institutions or organizations can easily realize single sign-on between multiple independent systems, improve user work efficiency and experience, and enhance system security. BRIEF DESCRIPTION OF DRAWINGS
[0050] Figure 1 The method flowchart of the present application is shown in the figure.
[0051] Figure 2 The system architecture diagram of the present application is shown in the figure. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution of the present application clear, complete description, and the advantages are more clear and obvious, the following will be further described in detail with the help of the attached drawings. It should be understood that the specific embodiments described here are part of the embodiments of the present application, not all the embodiments, only to explain the embodiments of the present application, and not for limiting the embodiments of the present application, all other embodiments obtained by the ordinary skill in the art without doing creative work, belong to the scope of protection of the present application.
[0053] Embodiment one
[0054] Please refer to Figure 1 The present application provides a technical solution: a decoupled configurable single sign-on method, which comprises the following steps:
[0055] Successfully log in to A system, configure HTML routing in A system and get user login ticket;The user inputs the account and password, and inputs the correct account and password in the login interface of A system;
[0056] Verify account and password, A system verifies the account and password input by the user to ensure the authenticity and legality of the user identity;
[0057] Generate login ticket, after verification, A system generates a unique login ticket token for the user, which will be used as the unique identifier of the user identity.
[0058] Configure routing and redirection, A system redirects the user to the specified HTML page according to the preset routing rules, and passes the login ticket as a parameter to the page during the redirection.
[0059] Include A system user ticket legality verification logic in HTML; get the login ticket, when the HTML page is loaded, try to get the A system login ticket token from the specific parameters of the URL, local storage or other specified locations;
[0060] Call the verification interface, the HTML page calls the verification interface provided by the A system through Ajax, and passes the obtained login ticket as a request parameter to the interface;
[0061] Verify the legality of the ticket, the verification interface of the A system verifies the incoming login ticket to ensure that the ticket is real and valid and belongs to the current user;
[0062] Handle the verification result, according to the result returned by the verification interface, the HTML page performs corresponding operations, if the verification is successful, the user is allowed to continue accessing the page; if the verification fails, the user is prompted to log in again or other processing.
[0063] Include B system user ticket legality verification logic in HTML; get the current user information, after the A system login ticket verification is successful, the HTML page further obtains the detailed information of the current user from the A system;
[0064] Call the B system login interface, use the obtained user information as a parameter, the HTML page calls the login interface provided by the B system for verification, and sends the encrypted user information to the B system server for verification;
[0065] Handle the B system verification result, according to the result returned by the B system login interface, the HTML page performs corresponding operations; if the verification is successful, it means that the user has successfully logged in to the B system; if the verification fails, the user needs to re-enter the account and password to log in to the B system or perform other processing.
[0066] Implement page redirection between different systems in HTML, wait for the B system verification result, after calling the B system login interface, the HTML page waits for the return result of the interface;
[0067] Determine the verification result, as soon as the B system verification result is received, the HTML page immediately determines whether the result indicates a successful verification;
[0068] Realize page jump, if the authentication is successful, the page is automatically redirected to the related page of the B system according to the preset jump rule or the jump instruction returned by the B system; if the authentication fails, the page will prompt the user to log in and give the corresponding processing suggestion, re-login, check the network connection.
[0069] Embodiment two
[0070] On the basis of embodiment one, a decoupled configurable single sign-on system is proposed, which is composed of a login ticket acquisition module, a first ticket legality verification module, a second ticket legality verification module and a page jump module.
[0071] The login ticket acquisition module successfully logs in the A system, configures the HTML route in the A system and acquires the user login ticket; the user inputs the account and password, and inputs the correct account and password in the login interface of the A system.
[0072] Verify the account and password, the A system verifies the account and password input by the user to ensure the authenticity and legality of the user's identity.
[0073] Generate login ticket, after verification, the A system generates a unique login ticket token for the user, which will be used as the unique identifier of the user's identity.
[0074] Configure the route and jump, the A system redirects the user to the specified HTML page according to the preset route rule, and passes the login ticket as a parameter to the page during the jump process.
[0075] The first ticket legality verification module includes the A system user ticket legality verification logic in the HTML; acquire the login ticket, when the HTML page is loaded, try to acquire the A system login ticket token from the specific parameters of the URL, local storage or other specified locations.
[0076] Call the verification interface, the HTML page calls the verification interface provided by the A system through Ajax, and passes the acquired login ticket as a request parameter to the interface.
[0077] Verify the ticket legality, the verification interface of the A system verifies the incoming login ticket to ensure that the ticket is real and valid and belongs to the current user.
[0078] Handle the verification result, according to the result returned by the verification interface, the HTML page executes the corresponding operation, if the verification is successful, the user is allowed to continue to access the page; if the verification fails, the user is prompted to re-login or perform other processing.
[0079] The second ticket legality verification module includes B system user ticket legality verification logic in HTML; current user information is acquired, and after the A system login ticket verification succeeds, the HTML page further acquires detailed information of the current user from the A system;
[0080] The B system login interface is called, the acquired user information is used as a parameter, the HTML page calls the login interface provided by the B system to perform verification, and sends the encrypted user information to the B system server to perform verification;
[0081] The B system verification result is processed, according to the result returned by the B system login interface, the HTML page performs corresponding operations; if the verification succeeds, it indicates that the user has successfully logged in the B system; if the verification fails, the user needs to re-input the account and password to log in the B system or perform other processing.
[0082] The page jump module realizes page jump between different systems in HTML, waits for the B system verification result, and after the B system login interface is called, the HTML page waits for the return result of the interface;
[0083] The verification result is judged, once the verification result of the B system is received, the HTML page immediately judges whether the result indicates that the verification succeeds;
[0084] The page jump is realized, if the verification succeeds, the page automatically redirects the user to the related page of the B system according to the preset jump rule or the jump instruction returned by the B system; if the verification fails, the page prompts the user that the login fails and gives corresponding processing suggestions, re-logs in, checks the network connection.
[0085] Although the embodiments of the present application have been shown and described, it can be understood by those skilled in the art that various changes, modifications, replacements and variations can be made to the embodiments without departing from the principles and spirits of the present application, the scope of the present application is defined by the appended claims and their equivalents.
Claims
1. A decoupled configurable single sign-on method, characterized by: The method comprises the following steps: Successfully log in to the A system, configure HTML routing in the A system, and obtain a user login ticket; Include A system user ticket legality verification logic in HTML; Include B system user ticket legality verification logic in HTML; Implement page jumping between different systems in HTML; The specific operation of including A system user ticket legality verification logic in HTML includes: Obtain a login ticket, when the HTML page is loaded, try to obtain the login ticket token of the A system from the specific parameters of the URL, local storage or other specified locations; Call the verification interface, the HTML page calls the verification interface provided by the A system through Ajax, and passes the obtained login ticket as a request parameter to the interface; Verify the legality of the ticket, the verification interface of the A system verifies the incoming login ticket to ensure that the ticket is real and valid and belongs to the current user; Process the verification result, according to the result returned by the verification interface, the HTML page executes the corresponding operation, if the verification is successful, the user is allowed to continue to access the page; if the verification fails, the user is prompted to log in again or other processing; The specific operation of including B system user ticket legality verification logic in HTML includes: Obtain current user information, after the login ticket of the A system is verified successfully, the HTML page further obtains the detailed information of the current user from the A system; Call the B system login interface, use the obtained user information as a parameter, the HTML page calls the login interface provided by the B system for verification, and sends the encrypted user information to the B system server for verification; Process the B system verification result, according to the result returned by the B system login interface, the HTML page executes the corresponding operation; if the verification is successful, it indicates that the user has successfully logged in to the B system; if the verification fails, the user needs to re-enter the account and password to log in to the B system or perform other processing; The specific operation of implementing page jumping between different systems in HTML includes: Wait for the B system verification result, after calling the B system login interface, the HTML page waits for the return result of the interface; Determine the verification result, as soon as the verification result of the B system is received, the HTML page immediately determines whether the result indicates that the verification is successful; Implement page jumping, if the verification is successful, the page automatically redirects the user to the related page of the B system according to the preset jumping rule or the jumping instruction returned by the B system; if the verification fails, the page will prompt the user that the login fails and give corresponding processing suggestions, such as re-login or checking network connection.
2. The decoupled configurable single sign-on method of claim 1, wherein: The specific operation of successfully logging in to the A system, configuring HTML routing in the A system, and obtaining a user login ticket includes: User inputs account and password, the user inputs the correct account and password in the login interface of the A system; Verify the account and password, the A system verifies the account and password input by the user to ensure the authenticity and legality of the user's identity; Generate a login ticket, after verification, the A system generates a unique login ticket token for the user, which will serve as the unique identifier of the user's identity; Configuration routing and jump, A system according to the preset routing rules, the user is redirected to the designated HTML page, and the login ticket is passed as a parameter in the jump process.
3. A decoupled configurable single sign-on system according to any one of claims 1-2, characterized in that: The system comprises a login ticket acquisition module, a first ticket legality verification module, a second ticket legality verification module and a page jump module; The login ticket acquisition module successfully logs in the A system, configures the HTML route in the A system and acquires the user login ticket; The first ticket legality verification module includes A system user ticket legality verification logic in HTML; The second ticket legality verification module includes B system user ticket legality verification logic in HTML; The page jump module realizes page jump between different systems in HTML; The first ticket legality verification module acquires the login ticket, when the HTML page is loaded, tries to acquire the login ticket token of the A system from the specific parameters of the URL, the local storage or other specified locations; Call the verification interface, the HTML page calls the verification interface provided by the A system through Ajax, and passes the acquired login ticket as a request parameter to the interface; Verify the legality of the ticket, the verification interface of the A system verifies the login ticket passed in, to ensure that the ticket is real and valid and belongs to the current user; Process the verification result, according to the result returned by the verification interface, the HTML page executes the corresponding operation, if the verification is successful, the user is allowed to continue to access the page; if the verification fails, the user is prompted to log in again or other processing; The second ticket legality verification module acquires the current user information, after the login ticket verification of the A system is successful, the HTML page further acquires the detailed information of the current user from the A system; Call the B system login interface, use the acquired user information as a parameter, the HTML page calls the login interface provided by the B system for verification, and sends the encrypted user information to the B system server for verification; Process the B system verification result, according to the result returned by the B system login interface, the HTML page executes the corresponding operation; if the verification is successful, it indicates that the user has successfully logged in the B system; If the verification fails, the user needs to re-enter the account and password to log in the B system or perform other processing.
4. The decoupled configurable single sign-on system of claim 3, wherein: The page jump module waits for the B system verification result, after calling the B system login interface, the HTML page waits for the return result of the interface; Judge the verification result, as soon as the verification result of the B system is received, the HTML page immediately judges whether the result indicates that the verification is successful; Realize page jump, if the verification is successful, the page automatically redirects the user to the related page of the B system according to the preset jump rule or the jump instruction returned by the B system; If the verification fails, the page will prompt the user that the login fails and give corresponding processing suggestions, such as re-login and checking network connection.
Citation Information
Patent Citations
Single sign-on method and device for multiple application systems
CN105450637A
Method and system for realizing multi-system single sign-on based on user synchronization
CN112153041A