Single sign-on method, intelligent terminal and readable storage medium

By detecting and verifying client login credentials, using the unified verification interface and database management credentials, cross-domain and security issues of single sign-in are solved, and the convenience and security of users logging into multiple systems at one time is achieved, ensuring the validity of credentials and System security.

CN115102762BActive Publication Date: 2024-11-05SHENZHEN MIRACLE WISDOM NETWORK CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210707376.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-21
Publication Date
2024-11-05
Estimated Expiration
2042-06-21

AI Technical Summary

Technical Problem

The existing single sign-on technology has problems such as cross-domain restrictions, data insecurity and cumbersome steps, and there is no effective solution yet.

Method used

By detecting the client's login credentials, if they are invalid, they will enter the unified verification login interface, obtain and send login credentials to the server for verification, save valid credentials, use the database to set the expiration time of the credentials, realize the transmission and verification of login credentials, and support password-free login and Repeat verification to ensure safety and convenience.

Benefits of technology

It enables users to access multiple systems with just one login, reducing login time consumption, ensuring the security and convenience of login credentials, and improving the security and user experience of the system through database management of credential expiration time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115102762B_ABST
    Figure CN115102762B_ABST
Patent Text Reader

Abstract

The present invention provides a single sign-on method, an intelligent terminal and a readable storage medium, wherein the single sign-on method includes: in response to opening a subsystem of a server, detecting whether a subsystem login credential is obtained from a client; if the subsystem login credential is not obtained, or the obtained subsystem login credential is invalid, entering a unified verification login interface; obtaining the login credential from the unified verification login interface, and sending it to the main system of the server for verification; when the login credential is verified, saving the login credential to the client and the unified verification login interface, and entering the subsystem; if the subsystem login credential is obtained and the subsystem login credential is valid, entering the subsystem. The present invention stores the login credential in a database, realizes single sign-on based on the transmission and verification of the login credential, and can cleverly set the expiration time of the login credential using the database, thereby ensuring data security and convenient operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a single sign-on method, an intelligent terminal and a readable storage medium. Background Art

[0002] Single sign-on means that in multiple application systems, users only need to log in once to access all mutually trusted application systems. Generally, after logging in to an application system by accessing the web page of the single sign-on system, when accessing other trusted application systems, the identity can be verified through the single sign-on system, and the previous login information can be directly obtained for verification without the need to log in to the application system again.

[0003] Currently, there are three single sign-on methods: using cookies as a medium, implementing through JSONP, and redirecting through a page. However, the above existing technologies have the following problems: cross-domain inability, data insecurity, and cumbersome steps.

[0004] Currently, no effective solution has been proposed for the problems in the prior art. Summary of the invention

[0005] The technical problem solved by the present invention is to provide a single sign-on method, an intelligent terminal and a readable storage medium, which can realize single sign-on through the transmission and verification of login credentials, and use a database to cleverly set the expiration time of the login credentials, which is safe and convenient.

[0006] The present invention solves the technical problem by adopting the following technical solutions:

[0007] A single sign-on method includes: in response to opening a subsystem of a server, detecting whether a subsystem login credential is obtained from a client; if the subsystem login credential is not obtained, or the obtained subsystem login credential is invalid, entering a unified verification login interface; obtaining login credentials from the unified verification login interface, and sending them to the main system of the server for verification, the login credentials including: main system login credentials and subsystem login credentials; when the login credential verification passes, saving the login credential to the client and the unified verification login interface, and entering the subsystem; if the subsystem login credential is obtained and the subsystem login credential is valid, entering the subsystem.

[0008] In a preferred embodiment of the present invention, after the above-mentioned step of sending the main system to the server for verification, it includes: detecting whether the main system login credentials exist in the database and whether the main system login credentials are valid; if the main system login credentials are valid, detecting whether the subsystem login credentials exist in the database; when the subsystem login credentials exist in the database, calling the subsystem login credential verification interface for verification.

[0009] In a preferred embodiment of the present invention, after the above step of detecting whether the main system login credentials exist in the database and the main system login credentials are valid, it includes: if the main system login credentials do not exist or are invalid, entering the unified verification login interface to log in.

[0010] In a preferred embodiment of the present invention, after the above-mentioned step of detecting whether the subsystem login credentials exist in the database if the main system login credentials are valid, the following step is included: when the subsystem login credentials do not exist in the database, or when the subsystem login credentials are invalid, obtaining the latest subsystem login credentials by logging into the subsystem without a password, and saving the new subsystem login credentials in the database.

[0011] In a preferred embodiment of the present invention, after the step of calling the subsystem login credential verification interface for verification when the subsystem login credential exists in the database, it includes: when the subsystem login credential verification fails, obtaining new subsystem login credentials through password-free login of the subsystem, and saving the new subsystem login credentials in the database.

[0012] In a preferred embodiment of the present invention, the above-mentioned step of obtaining the latest subsystem login credentials by logging into the subsystem without a password includes: the main system generates a first pass, and calls the pass verification interface of the subsystem for verification; the subsystem obtains the first pass, and calls the pass verification interface of the main system for verification, and the verification result of the subsystem is the same as the verification result of the main system; when the verification is successful, the main system sends the user name information to the subsystem, so that the subsystem logs in without a password through the user name information and generates login credentials.

[0013] In a preferred embodiment of the present invention, after the above-mentioned subsystem obtains the first pass and calls the pass verification interface of the main system for verification, it includes: when the verification fails, obtaining the number of verification failures; when the number of verification failures does not exceed the preset number, repeating the steps of the main system generating the first pass and calling the pass verification interface of the subsystem for verification; when the number of verification failures exceeds the preset number, entering the unified verification login interface to log in.

[0014] An intelligent terminal comprises: a memory and a processor, wherein a single sign-on program is stored in the memory, and when the single sign-on program is executed by the processor, the steps of the single sign-on method described in any one of the above are implemented.

[0015] A readable storage medium, characterized in that a computer program is stored on the readable storage medium, and when the computer program is executed by a processor, the steps of the single sign-on method as described in any one of the above are implemented.

[0016] The technical effect achieved by the above-mentioned technical solution in the present invention is: through a separate login system platform, the user only needs to log in once to access multiple subsystems in the background, reducing the time consumption caused by multiple system logins. At the same time, the login system platform uses a database to store login credentials, realizes the transmission and verification of login credentials, and the expiration time setting of login credentials, which is safe and convenient.

[0017] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following specifically cites a preferred embodiment and describes it in detail with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0020] Figure 1 A flow chart of a single sign-on method shown in an embodiment of the present invention;

[0021] Figure 2 The present invention is a flowchart of another single sign-on method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to further explain the technical means and effects taken by the present invention to achieve the predetermined invention purpose, the embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present invention. Through the description of the specific implementation methods, the technical means and effects taken by the present invention to achieve the predetermined purpose can be more deeply and specifically understood, and the attached drawings are only for reference and explanation purposes, and are not used to limit the present invention.

[0023] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present invention may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.

[0024] It should be understood that, although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this article, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determination". Furthermore, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising", "including" indicate the presence of the described features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the presence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or", "and / or", "including at least one of the following" etc. used in the present invention may be interpreted as inclusive, or mean any one or any combination. For example, “comprising at least one of the following: A, B, C” means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C”, and for another example, “A, B or C” or “A, B and / or C” means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C”. An exception to this definition will only occur when a combination of elements, functions, steps or operations are inherently mutually exclusive in some manner.

[0025] It should be understood that, although the various steps in the flowchart in the embodiment of the present invention are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and they can be executed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0026] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0027] It should be noted that, in this article, step codes such as S11, S12, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute S12 first and then S11, etc., but these should all be within the scope of protection of the present invention.

[0028] See also Figure 1 , Figure 1 The present invention is a flowchart of a single sign-on method according to an embodiment of the present invention.

[0029] like Figure 1 As shown, the single sign-on method of this embodiment includes the following steps:

[0030] Step S11: in response to opening the subsystem of the server, detecting whether the subsystem login credentials are obtained from the client;

[0031] Step S12: If the subsystem login credentials are not obtained, or the obtained subsystem login credentials are invalid, then enter the unified verification login interface;

[0032] Step S13: Obtaining login credentials from the unified verification login interface and sending them to the main system of the server for verification, wherein the login credentials include: main system login credentials and subsystem login credentials;

[0033] Step S14: When the login credential verification is passed, the login credential is saved to the client and the unified verification login interface, and the subsystem is entered;

[0034] Step S15: If the subsystem login credentials are obtained and the subsystem login credentials are valid, enter the subsystem.

[0035] It should be noted that the present invention includes a server which is a main system and one or more subsystems; a database: redis; a client which can be a browser; and a login credential which can be a Token.

[0036] Session: In computers, especially in network applications, it is called "session control". The Session object stores the properties and configuration information required for a specific user session. When the user jumps between web pages of the application, the variables stored in the Session object will not be lost, but will exist throughout the user session.

[0037] Ticket: A certificate is a pass for mutual trust between two machines.

[0038] Through the above method, users only need to log in once through a separate login system platform to access multiple subsystems in the background, reducing the time consumption caused by multiple system logins. At the same time, the login system platform uses redis to store sessionId, reducing the system's session overhead.

[0039] Optionally, before the step of obtaining login credentials from the unified verification login interface and sending them to the main system of the server for verification, it includes: detecting whether the login credentials exist in the unified verification login interface; if so, obtaining the login credentials from the unified verification login interface; if not, entering the user account password to log in.

[0040] Optionally, after the step of sending it to the main system of the server for verification, it includes: detecting whether the main system login credentials exist in the database and whether the main system login credentials are valid; if the main system login credentials are valid, detecting whether the subsystem login credentials exist in the database; when the subsystem login credentials exist in the database, calling the subsystem login credential verification interface for verification.

[0041] Optionally, after the step of detecting whether the main system login credentials exist in the database and the main system login credentials are valid, the method further includes: if the main system login credentials do not exist or are invalid, entering the unified verification login interface to log in.

[0042] Exemplarily, entering the unified verification login interface to log in means logging in by inputting the user account and password in the unified verification login interface, and entering the subsystem after successful login.

[0043] Optionally, if the main system login credentials are valid, after the step of detecting whether the subsystem login credentials exist in the database, the step includes: when the subsystem login credentials do not exist in the database, or when the subsystem login credentials are invalid, obtaining the latest subsystem login credentials by logging into the subsystem without a password, and saving the new subsystem login credentials in the database.

[0044] For example, password-free login refers to login without inputting a user password.

[0045] Optionally, when the subsystem login credentials exist in the database, after the step of calling the subsystem login credential verification interface for verification, it includes: when the subsystem login credential verification fails, obtaining new subsystem login credentials through password-free login of the subsystem, and saving the new subsystem login credentials in the database.

[0046] Optionally, the step of obtaining the latest subsystem login credentials by logging into the subsystem without a password includes: the main system generates a first pass, and calls the pass verification interface of the subsystem for verification; the subsystem obtains the first pass, and calls the pass verification interface of the main system for verification, and the verification result of the subsystem is the same as the verification result of the main system; when the verification is successful, the main system sends user name information to the subsystem, so that the subsystem logs in without a password through the user name information and generates login credentials.

[0047] Optionally, after the subsystem obtains the first pass and calls the pass verification interface of the main system for verification, it includes: when the verification fails, obtaining the number of verification failures; when the number of verification failures does not exceed the preset number, repeating the steps of the main system generating the first pass and calling the pass verification interface of the subsystem for verification; when the number of verification failures exceeds the preset number, entering the unified verification login interface to log in.

[0048] See also Figure 2 , Below, the 7G smart pole platform is taken as an example of the background of the large system (i.e. the main system mentioned above) on the server side, the 7G solution platform is taken as an example of the small system (i.e. the subsystem mentioned above), and the front-end page of the browser is taken as an example of the client.

[0049] First, log in through the 7G smart pole platform (big system), and store the generated token and user name in the sessionStorage in the front-end using the key-value method; click the button to enter the subsystem page, and then obtain the token (called tokenSm) saved in the subsystem browser, and the token in the big system (called tokenBig). If tokenBig does not exist, jump to the big platform login interface to enter the user name and password to log in; if tokenBig exists, go to the 7G smart pole service background to request the small system token interface (called: getTokenSm) with tokenSm and tokenBig parameters.

[0050] In the 7G smart pole service background, first determine whether tokenBig (large system token) exists in redis. If not, respond to the front end and let its client jump to the login interface of the 7G smart pole; if it exists, determine tokenSm (small system token). If it is determined that tokenSm exists, verify the tokenSm small system token. The large system (7G smart pole platform) service goes through the token verification interface of the small system (7G solution platform).

[0051] If the response result of the verification interface is successful, the tokenSm is returned to the front end and saved on the front end.

[0052] If the verification interface response fails, let the small system return the latest tokenSm through password-free login. The specific steps are as follows: First, the large system service (7G smart pole platform) generates a ticket according to the ticket generation rules, and calls the ticket verification interface request in the small system (7G solution platform) with the ticket. The small system (7G solution platform) calls the ticket verification interface request of the large system (7G smart pole platform) with the ticket sent by the large system. If the result of the large system response is successful verification, the small system responds to the large system with the result of successful verification; second, the large system (7G smart pole platform) calls the password-free login interface of the small system (7G solution platform), and the request parameters include ticket and username; the small system verifies that the ticket is valid and logs in through username, generates a token, and returns it to the large system. Third, the large system receives the tokenSm of the password-free login interface response, saves it in redis, and responds the token of the small system to the getTokenSm interface. The front end saves the small system token (tokenSm) obtained in response to the sessionStorage of the subsystem client.

[0053] Through the above method, single sign-on is achieved.

[0054] The single sign-on method provided by the present invention, through the transmission and verification of login credentials, enables the user to access multiple backend subsystems with only one login, thereby reducing the time consumption caused by multiple system logins, and cleverly setting the expiration time of the login credentials using a database, thereby ensuring data security and convenient operation steps.

[0055] The present application also provides an intelligent terminal, which includes a memory and a processor. A single sign-on program is stored in the memory. When the single sign-on program is executed by the processor, the steps of the single sign-on method in any of the above embodiments are implemented.

[0056] The present application also provides a readable storage medium, on which a single sign-on program is stored. When the single sign-on program is executed by a processor, the steps of the single sign-on method in any of the above embodiments are implemented.

[0057] In the embodiments of the smart terminal and readable storage medium provided in the present application, all technical features of any of the above-mentioned single sign-on method embodiments may be included. The expanded and explained contents of the specification are basically the same as those of the embodiments of the above-mentioned methods and will not be repeated here.

[0058] The embodiment of the present application further provides a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer executes the methods in the above various possible implementation modes.

[0059] An embodiment of the present application also provides a chip, including a memory and a processor, the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device equipped with the chip executes the methods in various possible implementation modes as described above.

[0060] Through the description of the above implementation methods, those skilled in the art can clearly understand that the embodiments of the present invention can be implemented by hardware, or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the embodiments of the present invention.

[0061] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the specific details in the above embodiments. The above embodiments and drawings are exemplary. The modules or processes in the drawings are not necessarily required to implement the embodiments of the present invention and cannot be understood as limitations on the present invention. Within the technical concept of the present invention, the technical scheme of the present invention can be subjected to a variety of simple modifications and combinations, and these simple modifications and combinations all belong to the protection scope of the present invention.

Claims

1. A single sign-on method, characterized in that: The single sign-on method comprises: In response to opening the subsystem of the server, detecting whether a subsystem login credential is obtained from the client; If the subsystem login credentials are not obtained, or the obtained subsystem login credentials are invalid, then enter the unified verification login interface; Obtaining login credentials from the unified verification login interface and sending them to the main system of the server for verification, the login credentials including: main system login credentials and subsystem login credentials; Detect whether the main system login credentials exist in the database, and confirm whether the main system login credentials are valid; If the main system login credential exists and the main system login credential is valid, detecting whether the subsystem login credential exists in the database; When the subsystem login credential is detected, calling the subsystem login credential verification interface to verify the subsystem login credential; When the subsystem login credential verification fails, generating a first pass, and calling the pass verification interface of the subsystem to verify the first pass; Control the subsystem to obtain the first pass, and call the pass verification interface of the main system to verify the first pass; Obtaining verification results of the main system and the subsystem on the first pass, wherein the verification result of the subsystem is the same as the verification result of the main system; When the verification is successful, the main system sends the user name information and the first pass to the subsystem; Log into the subsystem without a password based on the first pass and the user name information, and generate login credentials; The subsystem login credentials are stored in the database and sent to the client for storage; When the subsystem login credential is verified, the subsystem login credential is saved to the client and the unified verification login interface, and the subsystem is entered.

2. The method according to claim 1, characterized in that After the step of detecting whether the main system login credentials exist in the database and confirming whether the main system login credentials are valid, the method further includes: If the main system login credentials do not exist or are invalid, enter the unified verification login interface to log in.

3. The method according to claim 1, characterized in that After the step of detecting whether the subsystem login credentials exist in the database if the main system login credentials exist and the main system login credentials are valid, and confirming whether the subsystem login credentials are valid, the method further comprises: When the subsystem login credential does not exist in the database or the subsystem login credential is invalid, the latest subsystem login credential is obtained by logging into the subsystem without a password, and the new subsystem login credential is saved in the database.

4. The method according to claim 1, characterized in that After the step of calling the subsystem login credential verification interface to perform verification when the subsystem login credential exists in the database, the method further comprises: When the subsystem login credential verification fails, a new subsystem login credential is obtained through a password-free login of the subsystem, and the new subsystem login credential is saved in a database.

5. The method according to claim 1, characterized in that After the step of causing the main system to generate a first pass and send it to the subsystem for verification when the subsystem login credential is not detected or the subsystem login credential is invalid, the method further comprises: When verification fails, obtain the number of verification failures; When the number of verification failures does not exceed a preset number, the main system is caused to regenerate a first pass, and the pass verification interface of the subsystem is called for verification; When the number of verification failures exceeds a preset number, enter the unified verification login interface to log in.

6. An intelligent terminal, characterized in that: The intelligent terminal comprises: a memory and a processor, wherein a single sign-on program is stored in the memory, and when the single sign-on program is executed by the processor, the steps of the single sign-on method according to any one of claims 1 to 5 are implemented.

7. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the single sign-on method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Login session expiration processing method and device and user terminal

    CN110673971A

  • Redis-based single sign-on method

    CN111581631A

  • Single sign-on method and device and storage medium

    CN112597472A

  • Method and system for single sign-on

    US20120311330A1