A method and apparatus for keeping a system alive based on a single sign-on system
By setting up a scheduled task in the single sign-on system to extend the validity period of user tokens and generate business tokens, the problem of switching between multiple business systems for users is solved, achieving a seamless login experience for users and improving business efficiency.
Patent Information
- Application Number
- CN202411860372.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2044-12-17
AI Technical Summary
In the existing single sign-on system, user tokens automatically expire after a period of inactivity, requiring users to log in again and impacting business processes.
By setting up a scheduled task in the single sign-on system to automatically extend the validity period of user login tokens and generate business tokens when users switch to business systems, the validity of the tokens is verified, ensuring smooth switching between multiple business systems for users.
This extends the validity period of user login tokens, reduces repeated login authentication, and improves business processing efficiency.
Smart Images

Figure CN119995919B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of user authentication, and more specifically, to a method and apparatus for keeping a user alive based on a single sign-on system. Background Technology
[0002] Most single sign-on (SSO) systems aim to achieve single sign-on, single sign-out, switching between different business systems, user authentication, and user token issuance. The SSO process is generally quite complex, and users are reluctant to perform multiple operations. There is no special handling for the duration of a user's token usage within the business system. When a user has not performed any business operations for a period of time, the token automatically expires, potentially requiring the user to re-login for business operations, thus impacting the user's business processes. Summary of the Invention
[0003] To address the technical problem that existing single sign-on systems do not provide special handling for the duration of a user's token usage in a business system, this invention provides a keep-alive method and apparatus based on a single sign-on system.
[0004] According to one aspect of the present invention, the present invention provides a keep-alive method based on a single sign-on system, comprising: The single sign-on system authenticates the user based on the identity authentication information entered by the user and generates an authentication result, which includes authentication success and information error. When the authentication result is successful, the single sign-on system generates a user login token for the user and automatically extends the validity period of the user login token according to the set background timed task. When the user jumps to the business system to execute the current pending business, the single sign-on system generates a first business token based on the user's login token; When the user calls the business interface of the current pending business, the business system verifies the first business token and generates a verification result, wherein the verification result includes whether the business token is valid or invalid. When the verification result indicates that the business token is valid, the user executes the current pending business.
[0005] Optionally, when the verification result indicates that the service token is invalid, the single sign-on system generates a second service token based on the user's login token and outputs the generation result, which includes successful generation and failed generation.
[0006] Optionally, when the generation result is successful, the step of changing the user's current pending business when the verification result is a valid business token is as follows: The user executes the current pending task based on the second service token.
[0007] Optionally, when the generation result is a failure, the single sign-on system updates the user's login token.
[0008] Optionally, the method further includes updating the next to-do task to the current to-do task when the user completes the current to-do task and a next to-do task exists.
[0009] According to another aspect of the present invention, the present invention provides a keep-alive device based on a single sign-on system, the device comprising: The identity authentication module is used by the single sign-on system to authenticate the identity authentication information entered by the user and generate an authentication result, wherein the authentication result includes authentication success and information error; The user token module is used to generate a user login token for the user when the authentication result is successful, and to automatically extend the validity period of the user login token according to the set background timed task. The business token module is used to generate a first business token based on the user's login token when the user switches to the business system to execute the current pending business. The token verification module is used to verify the first business token when the user calls the business interface of the current pending business and generate a verification result, wherein the verification result includes whether the business token is valid or invalid. The task execution module is used to enable the user to execute the current pending task when the verification result indicates that the business token is valid.
[0010] Optionally, the service token module is further configured to, when the verification result of the token verification module is that the service token is invalid, generate a second service token based on the user's login token and output the generation result, wherein the generation result includes generation success and generation failure.
[0011] Optionally, the task execution module is further configured to allow the user to execute the current pending task based on the second business token when the generation result output by the business token module is successful.
[0012] Optionally, the user token module is further configured to update the user's login token when the generation result output by the business token module is a generation failure.
[0013] Optionally, the service token module is further configured to update the next pending task to the current pending task when the user has completed the current pending task and there is a next pending task.
[0014] According to another aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing a computer program for performing the methods described in any of the above aspects of the present invention.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the method described in any of the preceding aspects of the present invention.
[0016] The present invention discloses a method and apparatus for keeping a single sign-on (SSO) system active. The method includes: the SSO system authenticating the user based on input identity information and generating an authentication result; when the authentication result is successful, the SSO system generates a user login token for the user and automatically extends the validity period of the user login token according to a pre-set background timer task; when the user navigates to a business system to execute a pending task, the SSO system generates a first business token based on the user login token; when the user calls the business interface of the pending task, the business system verifies the first business token and generates a verification result; when the verification result indicates the business token is valid, the user executes the pending task. The method and apparatus, by setting a timer task to keep the user login token valid, automatically keep the token active when the user logs into the business system, extending the token's validity period, ensuring the user's access to the business system, reducing repeated login authentication, and improving the efficiency of business process handling. Attached Figure Description
[0017] Exemplary embodiments of the present invention can be more fully understood by referring to the following figures: Figure 1 A flowchart of a keep-alive method based on a single sign-on system according to a preferred embodiment of the present invention; Figure 2 This is a schematic diagram of the keep-alive device based on a single sign-on system according to a preferred embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device according to a preferred embodiment of the present invention. Detailed Implementation
[0018] Exemplary embodiments of the invention will now be described with reference to the accompanying drawings. However, the invention may be embodied in many different forms and is not limited to the embodiments described herein. These embodiments are provided to fully and completely disclose the invention and to fully convey its scope to those skilled in the art. The terminology used in the exemplary embodiments illustrated in the drawings is not intended to limit the invention. In the drawings, the same units / elements are referred to by the same reference numerals.
[0019] Unless otherwise stated, the terms used herein (including technical terms) have their common meaning as understood by one of ordinary skill in the art. Furthermore, it is understood that terms defined in commonly used dictionaries should be understood to have a meaning consistent with the context of their relevant field, and not to be interpreted as having an idealized or overly formal meaning.
[0020] Exemplary methods Figure 1 This is a flowchart of a keep-alive method based on a single sign-on system according to a preferred embodiment of the present invention. Figure 1 As shown, the keep-alive method based on a single sign-on system described in this preferred embodiment begins from step 101.
[0021] In step 101, the single sign-on system authenticates the user based on the identity authentication information entered by the user and generates an authentication result, wherein the authentication result includes authentication successful and information error.
[0022] In step 102, when the authentication result is successful, the single sign-on system generates a user login token for the user and automatically extends the validity period of the user login token according to the set background timed task.
[0023] In step 103, when the user jumps to the business system to execute the current pending business, the single sign-on system generates a first business token based on the user's login token.
[0024] In step 104, when the user calls the business interface of the current pending business, the business system verifies the first business token and generates a verification result, wherein the verification result includes whether the business token is valid or invalid.
[0025] In step 105, when the verification result indicates that the service token is valid, the user executes the current pending service.
[0026] Preferably, when the verification result indicates that the service token is invalid, the single sign-on system generates a second service token based on the user's login token and outputs the generation result, wherein the generation result includes successful generation and failed generation.
[0027] Preferably, when the generation result is successful, the step of changing the user's current pending business when the verification result is a valid business token is as follows: The user executes the current pending task based on the second service token.
[0028] Preferably, when the generation result is a generation failure, the single sign-on system updates the user's login token.
[0029] Preferably, the method further includes updating the next pending task to the current pending task when the user completes the current pending task and a next pending task exists.
[0030] The keep-alive method based on a single sign-on system described in this preferred embodiment enables automatic keep-alive of the user's login token when the user logs in to use the business system by setting a timed task to keep the user's login token valid. This extends the usage time of the user's login token, ensures the user's use of the business system, reduces repeated login authentication, facilitates user use, and improves the efficiency of the user's business process.
[0031] Exemplary device Figure 2 This is a schematic diagram of the keep-alive device based on a single sign-on system according to a preferred embodiment of the present invention. Figure 2 As shown, the keep-alive device 200 based on a single sign-on system according to this preferred embodiment includes: The identity authentication module 201 is used by the single sign-on system to authenticate the identity authentication information entered by the user and generate an authentication result, wherein the authentication result includes authentication success and information error; User token module 202 is used to generate a user login token for the user when the authentication result is successful, and to automatically extend the validity period of the user login token according to the set background timed task. The business token module 203 is used to generate a first business token based on the user's login token when the user jumps to the business system to execute the current pending business. The token verification module 204 is used to verify the first business token and generate a verification result when the user calls the business interface of the current pending business. The verification result includes whether the business token is valid or invalid. The task execution module 205 is used to have the user execute the current pending business when the verification result shows that the business token is valid.
[0032] Preferably, the service token module is further configured to, when the verification result of the token verification module is that the service token is invalid, generate a second service token based on the user's login token and output the generation result, wherein the generation result includes generation success and generation failure.
[0033] Preferably, the task execution module is further configured to allow the user to execute the current pending task based on the second business token when the generation result output by the business token module is successful.
[0034] Preferably, the user token module is further configured to update the user's login token when the generation result output by the business token module is a generation failure.
[0035] Preferably, the service token module is further configured to update the next pending task to the current pending task when the user has completed the current pending task and there is a next pending task.
[0036] The keep-alive device based on a single sign-on system described in this preferred embodiment extends the usage time of the login token by setting a timed task to keep the user's login token valid, thereby enabling the user to quickly switch between multiple pending tasks. The steps are the same as those of the keep-alive method based on a single sign-on system described in this invention, and the technical effects achieved are also the same, so they will not be repeated here.
[0037] Exemplary electronic devices Figure 3 This is a schematic diagram of an electronic device according to a preferred embodiment of the present invention. The electronic device may be either or both of a first device and a second device, or a standalone device independent of them. The standalone device may communicate with the first device and the second device to receive the collected input signals from them. Figure 3 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Figure 3 As shown, the electronic device includes one or more processors 301 and memory 302.
[0038] The processor 301 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0039] The memory 302 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 301 may execute the program instructions to implement the energy consumption anomaly diagnosis method based on enterprise energy consumption space of the various embodiments disclosed above, and / or other desired functions. In one example, the electronic device may also include an input device 303 and an output device 304, these components being interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0040] In addition, the input device 303 may also include, for example, a keyboard, a mouse, etc.
[0041] The output device 304 can output various information to the outside. The output device 304 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0042] Of course, for the sake of simplicity, Figure 3 Only some of the components of the electronic device relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.
[0043] Exemplary computer program products and computer-readable storage media In addition to the methods and devices described above, embodiments of this disclosure may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps of the keep-alive method for a single sign-on system according to various embodiments of this disclosure as described in the "Exemplary Methods" section above.
[0044] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this disclosure. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0045] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the steps in the keep-alive method for a single sign-on system according to various embodiments of this disclosure as described in the "Exemplary Methods" section above.
[0046] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0047] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0048] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0049] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0050] The apparatus and methods of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.
[0051] It should also be noted that in the apparatus, devices, and methods of this disclosure, the components or steps are decomposable and / or recombinable. Such decomposition and / or recombination should be considered equivalent to the present disclosure. The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0052] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A keep-alive method based on a single sign-on system, characterized in that, The method includes: The single sign-on system authenticates the user based on the identity authentication information entered by the user and generates an authentication result, which includes authentication success and information error. When the authentication result is successful, the single sign-on system generates a user login token for the user and automatically extends the validity period of the user login token according to the set background timed task. When the user jumps to the business system to execute the current pending business, the single sign-on system generates a first business token based on the user's login token; When the user calls the business interface of the current pending business, the business system verifies the first business token and generates a verification result, wherein the verification result includes whether the business token is valid or invalid. When the verification result indicates that the service token is valid, the user executes the current pending service. When the verification result indicates that the service token is invalid, the single sign-on system generates a second service token based on the user's login token and outputs the generation result, which includes generation success and generation failure. When the generation result is successful, the user executes the current pending business based on the second business token; When the generation result is a failure, the single sign-on system updates the user's login token. When the user completes the current pending task, if there is a next pending task, the next pending task will be updated to the current pending task.
2. A keep-alive device based on a single sign-on system, characterized in that, The device includes: The identity authentication module is used by the single sign-on system to authenticate the identity authentication information entered by the user and generate an authentication result, wherein the authentication result includes authentication success and information error; The user token module is used to generate a user login token for the user when the authentication result is successful, and to automatically extend the validity period of the user login token according to the set background timed task, and to update the user login token for the user when the generation result is failure. The business token module is used to generate a first business token based on the user's login token when the user switches to the business system to execute the current pending business. The token verification module is used to verify the first business token when the user calls the business interface of the current pending business and generate a verification result, wherein the verification result includes whether the business token is valid or invalid. The task execution module is used to execute the current pending task when the verification result is that the business token is valid, and to execute the current pending task based on the second business token when the generation result is that the generation is successful. The business token module is also used to generate a second business token based on the user's login token when the verification result of the token verification module is that the business token is invalid, and output the generation result, wherein the generation result includes generation success and generation failure. The service token module is also used to update the next pending task to the current pending task when the user has completed the current pending task and there is a next pending task.
3. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed, implements the method described in claim 1.
4. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method of claim 1.
Citation Information
Patent Citations
Browser kernel based multi-service integration system
CN104461537A
Method and system for conducting authentication on third-party application
CN104734849A
Single sign-on method, single sign-on terminal and single sign-on system
CN107294916A
