Application single sign-on method, system, terminal and storage medium

By obtaining the application ID and callback address of the target application, generating the target user name and target password, and binding the user to the target application, the redundant and cumbersome authentication process when users log in to multiple application systems in the prior art is solved, and single-point login for the application is realized, simplifying the user login process and optimizing the user experience.

CN119172161BActive Publication Date: 2025-03-18深圳开鸿数字产业发展有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411451354.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-03-18
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

In the prior art, when users log in on multiple different application systems, the authentication process is redundant and cumbersome, and cannot meet user needs.

Method used

By obtaining the application ID and callback address of the target application, generating the target username and target password, generating a temporary verification code and sending it to the target application, realizing the binding between the user and the target application, and jumping to the application homepage of the target application when the user logs in, completing the application single sign-in.

Benefits of technology

It simplifies the authentication process for users to log in to target applications, optimizes the user experience, reduces the complexity of user login, and improves security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172161B_ABST
    Figure CN119172161B_ABST
Patent Text Reader

Abstract

The present invention discloses an application single sign-on method, system, terminal and storage medium, the method comprising: obtaining an application ID and a callback address of a target application, and generating a target user name and a target password according to the application ID and the callback address; generating a temporary verification code according to the target user name and the target password, and sending the temporary verification code to the target application according to the callback address; when receiving an information acquisition request sent by the target application, determining a target interface and target user information according to the information acquisition request, and binding the target application to the user according to the target user information; when receiving a login request from the user, if the login request contains the target interface, jumping to the application homepage of the target application to complete the application single sign-on. The present invention can effectively simplify the authentication process of a user logging into an application and optimize the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] There may be multiple application systems in an enterprise, each of which has its own login authentication logic. Every time a user logs in to an application system, he or she needs to enter the account and password to log in. When facing multiple different application systems, different operations need to be performed for verification, which makes the user login authentication process redundant and cumbersome, reducing the user experience.

[0003] Therefore, the prior art still needs to be improved and developed. Summary of the invention

[0004] The main purpose of the present invention is to provide an application single sign-on method, system, terminal and computer-readable storage medium, aiming to solve the problem in the prior art that when a user logs in to multiple different application systems, the authentication process is redundant and cumbersome and cannot meet user needs.

[0005] To achieve the above object, the present invention provides an application single sign-on method, the application single sign-on method comprising the following steps:

[0006] Obtaining the application ID and callback address of the target application, and generating a target user name and a target password according to the application ID and the callback address;

[0007] Generate a temporary verification code according to the target user name and the target password, and send the temporary verification code to the target application according to the callback address;

[0008] When receiving an information acquisition request sent by the target application, determining a target interface and target user information according to the information acquisition request, and binding the target application to the user according to the target user information;

[0009] When receiving the login request of the user, if the login request contains the target interface, the application homepage of the target application is jumped to complete the application single sign-on.

[0010] Optionally, the application single sign-on method, wherein the step of obtaining an application ID and a callback address of a target application, and generating a target user name and a target password according to the application ID and the callback address, specifically includes:

[0011] When receiving an authentication request from a user, determining a target application that needs to be authenticated according to the authentication request;

[0012] The application ID and the callback address of the target application are obtained, a target user name and a target password are generated according to the application ID and the callback address, and the target user name and the target password are configured on the target application.

[0013] Optionally, the application single sign-on method, wherein the step of generating a temporary verification code according to the target user name and the target password, and sending the temporary verification code to the target application according to the callback address, specifically includes:

[0014] When receiving an initial login request from a user, verifying the target user name and the target password used by the user when logging in;

[0015] When the verification is successful, a temporary verification code is generated according to the target user name and the target password, and the temporary verification code is sent to the target application according to the callback address.

[0016] Optionally, in the application single sign-on method, the information acquisition request includes a target interface acquisition request and a user information acquisition request;

[0017] When receiving the information acquisition request sent by the target application, determining the target interface and the target user information according to the information acquisition request specifically includes:

[0018] When receiving a target interface acquisition request sent by the target application, determining a target interface and an interface validity period corresponding to the target interface according to the target interface acquisition request, and sending the target interface and the interface validity period to the target application;

[0019] When a user information acquisition request generated by the target application according to the target interface and the interface validity period is received, the target user information of the user is determined according to the user information acquisition request.

[0020] Optionally, in the application single sign-on method, the step of binding the target application to the user according to the target user information specifically includes:

[0021] Sending the target user information to the target application, and determining whether the user has established a binding relationship with the target application according to the target user information;

[0022] If yes, jump directly to the application homepage of the target application;

[0023] If not, a new user creation situation is determined according to the target user information, and the user is bound to the target application according to the new user creation situation.

[0024] Optionally, the application single sign-on method, wherein determining a new user creation situation according to target user information, and binding the user to the target application according to the new user creation situation, specifically includes:

[0025] Determine whether to create a new user based on the target user information;

[0026] If yes, binding the new user to the target application;

[0027] If not, jump to the user binding interface and bind the user to the target application according to the target user information.

[0028] Optionally, the application single sign-on method, wherein when receiving the login request of the user, if the login request includes the target interface, jumping to the application homepage of the target application to complete the application single sign-on, further comprises:

[0029] If the login request does not include the target interface, the user is redirected to the unified authentication login page to re-establish the binding relationship between the user and the target application.

[0030] In addition, to achieve the above-mentioned purpose, the present invention further provides an application single sign-on system, wherein the application single sign-on system comprises:

[0031] An information configuration module, used to obtain an application ID and a callback address of a target application, and generate a target user name and a target password according to the application ID and the callback address;

[0032] A verification code generation module, used to generate a temporary verification code according to the target user name and the target password, and send the temporary verification code to the target application according to the callback address;

[0033] An application binding module, for determining a target interface and target user information according to the information acquisition request when receiving an information acquisition request sent by the target application, and binding the target application to the user according to the target user information;

[0034] The application login module is used to, when receiving a login request from the user, jump to the application homepage of the target application if the login request contains the target interface, so as to complete the application single sign-on.

[0035] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and an application single sign-on program stored in the memory and executable on the processor, and when the application single sign-on program is executed by the processor, the steps of the application single sign-on method described above are implemented.

[0036] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an application single sign-on program, and when the application single sign-on program is executed by a processor, the steps of the application single sign-on method described above are implemented.

[0037] In the present invention, the application ID and callback address of the target application are obtained, and a target user name and a target password are generated according to the application ID and the callback address; a temporary verification code is generated according to the target user name and the target password, and the temporary verification code is sent to the target application according to the callback address; when an information acquisition request sent by the target application is received, the target interface and target user information are determined according to the information acquisition request, and the target application is bound to the user according to the target user information; when a login request from the user is received, if the login request contains the target interface, the application homepage of the target application is jumped to complete the application single sign-on. The present invention obtains the application ID and callback address of the target application that the user needs to log in, and sends the application ID and callback address to a unified authentication service platform to obtain the target user name and target password, thereby configuring the target application. Afterwards, the interface between the target application and the unified authentication service platform is obtained to bind the user to the target application. This allows the user to directly authenticate and log in through the unified authentication service platform when logging into the target application, and jump to the homepage of the target application, simplifying the authentication process for users to log in to the target application and optimizing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a flow chart of a preferred embodiment of the single sign-on method of the present invention;

[0039] Figure 2 It is a schematic diagram of the overall structure of a preferred embodiment of the single sign-on method of the present invention;

[0040] Figure 3 It is a schematic diagram of the overall process implementation of a preferred embodiment of the single sign-on method of the present invention;

[0041] Figure 4 It is a structural diagram of a preferred embodiment of the present invention applying a single sign-on system;

[0042] Figure 5It is a structural diagram of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0044] There may be multiple application systems in an enterprise, each of which has its own login authentication logic. Every time a user logs in to an application system, he or she needs to enter the account and password to log in. When facing multiple different application systems, different operations need to be performed for verification, which makes the user login authentication process redundant and cumbersome, reducing the user experience.

[0045] The present invention integrates the login of unified users among multiple application systems, connects the user systems of various application systems, breaks the development language barriers, and realizes the unified management of user login authentication, wherein the permissions of each application are still maintained by each system itself to maintain the expansibility of permissions. At the same time, the present invention is designed to be simple and standardized, providing a simple access method for subsequent access to other application systems, and can quickly complete unified user authentication to realize user single-point login.

[0046] The application single sign-on method described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the application single sign-on method includes the following steps:

[0047] Step S10: Obtain the application ID and callback address of the target application, and generate a target user name and a target password according to the application ID and the callback address.

[0048] like Figure 2 and Figure 3 As shown, in order to realize the login integration of unified users among multiple application systems, a unified authentication service platform is set up in the present invention to realize the authentication binding between users and multi-system applications.

[0049] The unified authentication service platform in the present invention can be an integrated application platform developed by an enterprise, which can be set in a terminal. The unified authentication service platform can receive the user's login information through a preset unified user authentication service login page. When the user opens the unified user authentication service login page through a browser, the user's account information is entered in the preset account input box to establish a connection between the user and the unified authentication service platform.

[0050] Before the user performs unified identity authentication and authorization login access, the user needs to register and configure the application on the unified authentication service platform (equivalent to the internal authentication platform). The configuration information includes the application ID of the target application and the callback address of the target application. After saving, the corresponding appid (that is, the target user name in the present invention) and appsecret (that is, the target password in the present invention) are obtained before the access process can be started (wherein, appid and appsecret are the target user name and target password issued by the unified authentication service platform to the target application to be accessed).

[0051] Specifically, when a user's authentication request is received, the target application that needs to be authenticated is determined based on the authentication request; the application ID and callback address of the target application are obtained, a target user name and a target password are generated based on the application ID and the callback address, and the target user name and the target password are configured on the target application.

[0052] The unified authentication service platform encapsulates its services into open resources for use by third parties (i.e., multiple system applications) and can be used for account management. The unified authentication service platform can also be said to be a bridge between users and target applications (i.e., the authentication center). The unified authentication service platform connects two service ends, one for users and the other for system applications. The unified authentication service platform can establish a binding relationship between users and target applications, thereby achieving single sign-on for users on target applications.

[0053] like Figure 3 As shown, the user obtains the application ID and callback address of the target application, and sends the application ID and callback address to the unified authentication service platform. The unified authentication service platform generates a user account (i.e., the target user name in the present invention) and password (i.e., the target password in the present invention) according to the application ID and callback address, and the user configures the target application with the user account and password.

[0054] The system configuration sample saved by the unified authentication service platform after receiving the application ID and callback address is as follows:

[0055] Name: Application 1;

[0056] ID: 929939DFKJS009238KMLPOD99823 (unique application ID);

[0057] Appid: MemberSystem (i.e. the target user name in the present invention);

[0058] Appsecrt: 2a10dYRcFip80f0jIKGzRGulFelK12036xWQKgajanfxT65QB4htsEXNK (i.e., the target password in the present invention, the ciphertext encrypted by BCryptPasswordEncoder);

[0059] redirectUri: http: / / yingyong1.com / notity;

[0060] like Figure 3 As shown in the figure, after obtaining the target user name and target password generated by the unified authentication service platform, it is necessary to configure the target user name and target password issued by the authentication in each application system (the target acquisition interface and user information acquisition interface of the unified authentication service platform also need to be configured in the subsequent application system).

[0061] Configure unified authentication configuration example in the target application:

[0062] Name: authentication;

[0063] Appid: MemberSystem;

[0064] Appsecrt: 123456 (plain text here);

[0065] TokenUri: http: / / xxxx / token (target interface, which needs to be obtained from the unified authentication service platform later);

[0066] UserUri: http: / / xxxx / user (user information acquisition interface, which needs to be obtained from the unified authentication service platform later);

[0067] isCreateUser: true / false (whether to create a user);

[0068] Application authentication process: Assume that there are three applications that need to be integrated for unified user authentication. The user first logs in to the application management interface of the unified authentication service platform to configure, generate a corresponding user name and password for each application, and configure and store them in their respective systems based on their corresponding user names and passwords.

[0069] In the specific implementation process, when the user visits application 1 for the first time (assuming that application 1 is the target application in the present invention), it is necessary to first authenticate on the unified authentication service platform. The specific implementation process is: when the user accesses application 1 through the browser, the global filter is intercepted to determine whether the user login request contains a token (that is, the target interface in the present invention). If not, it is considered that no authentication binding is performed, and redirect to the unified authentication login page of the unified authentication service platform. The redirect address contains the address of application 1 visited for the first time (that is, the callback address in the present invention). An example address is: http: / / xxxxx / login redirect_uri=http: / / yingyong1.com.

[0070] Step S20: Generate a temporary verification code according to the target user name and the target password, and send the temporary verification code to the target application according to the callback address.

[0071] like Figure 3 As shown, when the user needs to log in to the target application (that is, when the user's initial login request is received), he or she first logs in to the unified authentication service platform using the target user name and target password. After the unified authentication service platform confirms the user account and password, it generates a temporary verification code, and the unified authentication service platform sends the temporary verification code to the target application according to the callback address.

[0072] Specifically, when the user's initial login request is received, the target user name and the target password used by the user when logging in are verified; when the verification passes, a temporary verification code is generated based on the target user name and the target password, and the temporary verification code is sent to the target application according to the callback address.

[0073] When the unified authentication service platform receives the target username and target password used by the user to log in, it will authenticate the user login information to determine whether it is the target username and target password information issued by itself. The main authentication process is to compare the target username and target password used by the user to log in with the previously generated username and password stored in the database. When the two are consistent, the user authentication is considered to be successful.

[0074] like Figure 3As shown, after logging in after entering the username and password, the callback address of the target application in the configuration of the unified authentication service platform is obtained, and a remote call is initiated. The unified authentication service platform issues a temporary verification code authCode, where the temporary verification code authCode is used for security verification to ensure the security of the call between the unified authentication service platform and the target application. Each time a user performs a login authentication, the unified authentication service platform and the target application will generate a unique and time-limited temporary verification code to ensure the security and reliability of the user's login to the target application.

[0075] Step S30: When receiving an information acquisition request sent by the target application, determine the target interface and target user information according to the information acquisition request, and bind the target application to the user according to the target user information. The information acquisition request includes a target interface acquisition request and a user information acquisition request.

[0076] like Figure 3 As shown, after the target application receives the temporary verification code issued by the unified authentication service platform, it generates a target interface acquisition request based on the temporary verification code, user account and password, and sends the target interface acquisition request to the unified authentication service platform. The unified authentication service platform determines the target interface and interface validity based on the target interface acquisition request, and sends the target interface and interface validity to the target application. Further, the target application generates a user information acquisition request based on the target interface, and sends the user information acquisition request to the unified authentication service platform. The unified authentication service platform determines the user information based on the user information acquisition request, and sends the user information to the target application.

[0077] Specifically, when a target interface acquisition request sent by the target application is received, the target interface and the interface validity time corresponding to the target interface are determined according to the target interface acquisition request, and the target interface and the interface validity time are sent to the target application; when a user information acquisition request generated by the target application according to the target interface and the interface validity time is received, the target user information of the user is determined according to the user information acquisition request.

[0078] After the target application receives the temporary verification code authCode, it carries the user account and password to access the unified authentication service platform (sends a target interface acquisition request to the unified authentication service platform) to obtain the target interface. After receiving the target interface acquisition request, the unified authentication service platform compares the temporary verification code and verifies the password. It verifies the temporary verification code and password to determine whether it is the application authenticated and issued by itself. After the verification passes, it issues the corresponding target interface to the target application, saves the target interface internally and maintains the expiration time, and returns the result (i.e., the target interface and the maintenance expiration time) to application 1. After application 1 receives the target interface, it requests to call the user information and user information acquisition interface of the unified authentication service platform to obtain the corresponding user information.

[0079] The target user information is sent to the target application, and the target user information is used to determine whether the user has established a binding relationship with the target application; if so, the application is directly redirected to the application homepage of the target application. If not, the new user creation status is determined based on the target user information, and it is determined whether a new user is created based on the target user information; if so, the new user is bound to the target application; if not, the application is redirected to the user binding interface, and the user is bound to the target application based on the target user information.

[0080] The target application determines whether it has been bound based on the user information. If it has been bound, it will directly jump to the application homepage of the target application; if it has not been bound, it will determine whether to create a new user. If so, the new user will be bound to the target application and the application homepage of the target application will be jumped to; if a new user is not created, it will jump to the user binding interface to realize the binding of the unified authentication service platform and the target application, and return the target token to the browser.

[0081] like Figure 3 As shown, it is judged according to whether the configuration of the target application creates its own internal application. If it is judged to be automatically created, a random user is created and given ordinary user permissions. The user (i.e., the new user in the present invention) is bound to the application. When logging in later, the user will be considered as an existing user, and can be directly redirected (i.e., jumped) to the homepage of application 1. If the user is not automatically created, it is redirected to the user binding interface of the target application to perform the binding operation of the users on both sides (i.e., the user is bound to the target application according to the target user information). The target interface will be carried in the subsequent user login request to complete the authentication, thus completing the operation of unified user login.

[0082] An application single sign-on method provided in the present invention can automatically generate a unique user name and password according to the user login requirements after obtaining the ID and callback interface of the target application. After the user is subsequently bound to the target application, there is no need to fill in the user name and password, and it can be directly called through the unified authentication service platform to directly log in and jump to the homepage of the target application, thereby reducing the security risks of the application system caused by the leakage of the application system passwords stored in the single sign-on platform in the prior art. At the same time, it also allows the user to access the corresponding system application by filling in the user name and password only once, avoiding the redundant steps of manually obtaining and filling in the user name and password multiple times, and reducing the complexity of the user logging into the system application.

[0083] Step S40: When receiving a login request from the user, if the login request includes the target interface, jump to the application homepage of the target application to complete the application single sign-on.

[0084] When a user logs in to the target application through a browser, the user's login request will be directly verified. The verification content is whether the login request contains the target interface. If so, it proves that a binding relationship has been established between the user and the target application. The user name and password can be directly verified and logged in through the unified authentication service platform without the user having to manually enter and other complicated processes. The user can directly jump to the homepage of the target application.

[0085] When the user wants to log in to the target application through the browser next time, the user login request is obtained. When it is determined that the user login request contains the target interface, the user is directly redirected to the application homepage of the target application without going through a redundant and complicated login process.

[0086] Furthermore, if the login request does not include the target interface, the process jumps to a unified authentication login page to re-establish the binding relationship between the user and the target application.

[0087] On the other hand, if the user enters the browser and there is no target interface in the login request, the verification fails (it is determined that the login authentication has not been performed), and the user will be redirected to the unified authentication service platform to re-establish the binding between the user and the target application through the unified authentication service platform.

[0088] Since the single sign-on in the embodiment of the present invention can be realized by the binding relationship between the master and slave accounts, it is not limited to which platform the integrated application to be logged in belongs, and the application scenario of the single sign-on method of the present invention is expanded. Moreover, the master account and the slave account can be different. In actual applications, the integrated application can come from other platforms, and there can be users from other sources. When the user first uses the application and then uses the first platform, even if the user has different master and slave accounts, it is not necessary to unify the account for single sign-on, which eliminates the great inconvenience caused to the user and no longer limits the promotion and application of single sign-on.

[0089] The prior art must synchronize the account information of the login platform and the integrated application, while the present embodiment does not need to synchronize the main account used to log in to the first platform and the slave account used to log in to the integrated application, and two sets of independent accounts can be provided on the same platform. When performing single sign-on, the main account is first authenticated. If the authentication is passed, the root ticket can be obtained; when the user needs to log in to a certain integrated application, the authentication center determines whether the main account is bound to the slave account of the corresponding integrated application to be logged in. Once it is confirmed that the slave account has been bound, the sub-ticket can be obtained, and the sub-ticket can be used to log in to the corresponding integrated application. Among them, since the sub-ticket is obtained for a specific integrated application, different integrated applications can have different slave accounts, and different integrated applications can be logged in by obtaining different sub-tickets. In this way, the single sign-on is not affected by the specific account. In addition, since the third-party authentication center (openCA) is used to authenticate the main account and the slave account, once the relationship between the main and slave accounts is bound, it is not affected by the login location and terminal, and the single sign-on in the present embodiment can be realized, so that the single sign-on is not restricted by the platform, which is convenient for unifying the login accounts of multiple platforms, making the single sign-on more flexible and conducive to promotion. Furthermore, since only the binding relationship between the master and slave accounts is required when obtaining sub-tickets, and no specific login password is required, it is beneficial for users and the background of integrated applications to protect their account passwords and improve network security.

[0090] Furthermore, if Figure 4 As shown, based on the above application single sign-on method, the present invention also provides an application single sign-on system accordingly, wherein the application single sign-on system includes:

[0091] The information configuration module 51 is used to obtain the application ID and callback address of the target application, and generate a target user name and a target password according to the application ID and the callback address;

[0092] A verification code generation module 52, configured to generate a temporary verification code according to the target user name and the target password, and send the temporary verification code to the target application according to the callback address;

[0093] The application binding module 53 is used to determine the target interface and the target user information according to the information acquisition request when receiving the information acquisition request sent by the target application, and bind the target application with the user according to the target user information;

[0094] The application login module 54 is used for, when receiving a login request from the user, jumping to the application homepage of the target application if the login request contains the target interface, to complete the application single sign-on.

[0095] Furthermore, if Figure 5 As shown, based on the above-mentioned application single sign-on method and system, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Figure 5 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0096] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, an application single sign-on program 40 is stored on the memory 20, and the application single sign-on program 40 can be executed by the processor 10, thereby realizing the application single sign-on method in the present application.

[0097] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code stored in the memory 20 or process data, such as executing the application single sign-on method.

[0098] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.

[0099] In one embodiment, when the processor 10 executes the application single sign-on program 40 in the memory 20 , the steps of the application single sign-on method described above are implemented.

[0100] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an application single sign-on program, and when the application single sign-on program is executed by a processor, the steps of the application single sign-on method described above are implemented.

[0101] In summary, the present invention provides an application single sign-on method, system, terminal and computer-readable storage medium, the method comprising: obtaining the application ID and callback address of the target application, and generating a target user name and a target password according to the application ID and the callback address; generating a temporary verification code according to the target user name and the target password, and sending the temporary verification code to the target application according to the callback address; when receiving an information acquisition request sent by the target application, determining the target interface and the target user information according to the information acquisition request, and binding the target application to the user according to the target user information; when receiving a login request from the user, if the login request contains the target interface, jumping to the application homepage of the target application to complete the application single sign-on. The present invention obtains the application ID and callback address of the target application that the user needs to log in, and sends the application ID and callback address to a unified authentication service platform to obtain the target user name and target password, thereby configuring the target application. Afterwards, the interface between the target application and the unified authentication service platform is obtained to bind the user to the target application. This allows the user to directly authenticate and log in through the unified authentication service platform when logging into the target application, and jump to the homepage of the target application, simplifying the authentication process for users to log in to the target application and optimizing the user experience.

[0102] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal 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 terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.

[0103] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.

[0104] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. An application single sign-on method, characterized in that: The application single sign-on method comprises: Obtaining the application ID and callback address of the target application, and generating a target user name and a target password according to the application ID and the callback address; The step of obtaining the application ID and callback address of the target application and generating a target user name and a target password according to the application ID and the callback address specifically includes: When receiving an authentication request from a user, determining a target application that needs to be authenticated according to the authentication request; Obtaining an application ID and a callback address of the target application, generating a target user name and a target password according to the application ID and the callback address, and configuring the target user name and the target password on the target application; The user obtains the application ID and callback address of the target application, and sends the application ID and callback address to the unified authentication service platform. The unified authentication service platform generates a target user name and target password based on the application ID and callback address. Generate a temporary verification code according to the target user name and the target password, and send the temporary verification code to the target application according to the callback address; The generating a temporary verification code according to the target user name and the target password, and sending the temporary verification code to the target application according to the callback address, specifically includes: When receiving an initial login request from a user, verifying the target user name and the target password used by the user when logging in; When the verification is successful, a temporary verification code is generated according to the target user name and the target password, and the temporary verification code is sent to the target application according to the callback address; When the unified authentication service platform receives the target user name and target password used by the user to log in, it authenticates the user login information, determines whether it is the target user name and target password issued by itself, and compares the target user name and target password used by the user to log in with the previously generated user name and password stored in the database. If the two are consistent, it is determined that the user authentication is passed; The temporary verification code is used for security verification to ensure the security of the call between the unified authentication service platform and the target application. Every time a user logs in for authentication, the unified authentication service platform and the target application will generate a unique and time-limited temporary verification code to ensure the security and reliability of the user's login to the target application; When receiving an information acquisition request sent by the target application, determining a target interface and target user information according to the information acquisition request, and binding the target application to the user according to the target user information; The information acquisition request includes a target interface acquisition request and a user information acquisition request; When receiving the information acquisition request sent by the target application, determining the target interface and the target user information according to the information acquisition request specifically includes: When receiving a target interface acquisition request sent by the target application, determining a target interface and an interface validity period corresponding to the target interface according to the target interface acquisition request, and sending the target interface and the interface validity period to the target application; When receiving a user information acquisition request generated by the target application according to the target interface and the interface validity period, determining the target user information of the user according to the user information acquisition request; After receiving the temporary verification code, the target application sends a target interface acquisition request to the unified authentication service platform to obtain the target interface; after receiving the target interface acquisition request, the unified authentication service platform compares the temporary verification code and verifies the password, and determines whether it is the application authenticated and issued by itself by verifying the temporary verification code and password. After the verification is passed, the corresponding target interface is issued to the target application, and the target interface is saved internally and the expiration time is maintained, and the target interface and the maintained expiration time are returned to the target application. After receiving the target interface, the target application requests to call the user information and user information acquisition interface of the unified authentication service platform to obtain the corresponding user information; When receiving the login request of the user, if the login request contains the target interface, the application homepage of the target application is jumped to complete the application single sign-on.

2. The application single sign-on method according to claim 1, characterized in that: The binding the target application to the user according to the target user information specifically includes: Sending the target user information to the target application, and determining whether the user has established a binding relationship with the target application according to the target user information; If yes, jump directly to the application homepage of the target application; If not, a new user creation situation is determined according to the target user information, and the user is bound to the target application according to the new user creation situation.

3. The application single sign-on method according to claim 2, characterized in that: The determining of the new user creation status according to the target user information, and binding the user with the target application according to the new user creation status, specifically includes: Determine whether to create a new user based on the target user information; If yes, binding the new user to the target application; If not, jump to the user binding interface and bind the user to the target application according to the target user information.

4. The application single sign-on method according to claim 1, characterized in that: When receiving the login request of the user, if the login request includes the target interface, jumping to the application homepage of the target application to complete the application single sign-on, and then also including: If the login request does not include the target interface, the process jumps to the unified authentication login page to re-establish the binding relationship between the user and the target application.

5. An application single sign-on system, characterized in that: The application single sign-on system comprises: An information configuration module, used to obtain an application ID and a callback address of a target application, and generate a target user name and a target password according to the application ID and the callback address; The step of obtaining the application ID and callback address of the target application and generating a target user name and a target password according to the application ID and the callback address specifically includes: When receiving an authentication request from a user, determining a target application that needs to be authenticated according to the authentication request; Obtaining an application ID and a callback address of the target application, generating a target user name and a target password according to the application ID and the callback address, and configuring the target user name and the target password on the target application; The user obtains the application ID and callback address of the target application, and sends the application ID and callback address to the unified authentication service platform. The unified authentication service platform generates a target user name and target password based on the application ID and callback address. A verification code generation module, used to generate a temporary verification code according to the target user name and the target password, and send the temporary verification code to the target application according to the callback address; The generating a temporary verification code according to the target user name and the target password, and sending the temporary verification code to the target application according to the callback address, specifically includes: When receiving an initial login request from a user, verifying the target user name and the target password used by the user when logging in; When the verification is successful, a temporary verification code is generated according to the target user name and the target password, and the temporary verification code is sent to the target application according to the callback address; When the unified authentication service platform receives the target user name and target password used by the user to log in, it authenticates the user login information, determines whether it is the target user name and target password issued by itself, and compares the target user name and target password used by the user to log in with the previously generated user name and password stored in the database. If the two are consistent, it is determined that the user authentication is passed; The temporary verification code is used for security verification to ensure the security of the call between the unified authentication service platform and the target application. Every time a user logs in for authentication, the unified authentication service platform and the target application will generate a unique and time-limited temporary verification code to ensure the security and reliability of the user's login to the target application; An application binding module, for, when receiving an information acquisition request sent by the target application, determining a target interface and target user information according to the information acquisition request, and binding the target application to the user according to the target user information; The information acquisition request includes a target interface acquisition request and a user information acquisition request; When receiving the information acquisition request sent by the target application, determining the target interface and the target user information according to the information acquisition request specifically includes: When receiving a target interface acquisition request sent by the target application, determining a target interface and an interface validity period corresponding to the target interface according to the target interface acquisition request, and sending the target interface and the interface validity period to the target application; When receiving a user information acquisition request generated by the target application according to the target interface and the interface validity period, determining the target user information of the user according to the user information acquisition request; After receiving the temporary verification code, the target application sends a target interface acquisition request to the unified authentication service platform to obtain the target interface; after receiving the target interface acquisition request, the unified authentication service platform compares the temporary verification code and verifies the password, and determines whether it is the application authenticated and issued by itself by verifying the temporary verification code and password. After the verification is passed, the corresponding target interface is issued to the target application, and the target interface is saved internally and the expiration time is maintained, and the target interface and the maintained expiration time are returned to the target application. After receiving the target interface, the target application requests to call the user information and user information acquisition interface of the unified authentication service platform to obtain the corresponding user information; The application login module is used for, when receiving a login request from the user, jumping to the application homepage of the target application if the login request contains the target interface, so as to complete the application single sign-on.

6. A terminal, characterized in that: The terminal comprises: a memory, a processor, and an application single sign-on program stored in the memory and executable on the processor, wherein the application single sign-on program implements the steps of the application single sign-on method according to any one of claims 1 to 4 when executed by the processor.

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

Citation Information

Patent Citations

  • Single sign on method and system, and unified authentication system

    CN107846414A

  • Login method and device, storage medium and processor

    CN114726632A