Authentication center connection method, device, system and storage medium
By obtaining the docking reference information of the second authentication center and generating the docking interface, the problem of user center maintenance difficulty caused by the docking differences between different unified user authentication systems is solved, and the effect of reducing the difficulty of code maintenance and the isolation protocol conversion relationship is achieved.
Patent Information
- Application Number
- CN202110565690.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-24
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2041-05-24
AI Technical Summary
The differences in docking protocols, access interfaces and user information of different unified user authentication systems lead to the user center needing to debug and dock one by one, which increases the number of code modifications, complexity and maintenance difficulty.
By obtaining the docking reference information of the second authentication center, a second docking interface for docking is generated, and the docking between the first authentication center and the second authentication center is realized based on the fixed first docking interface of the interface and the first authentication center.
It reduces the difficulty of maintaining the first authentication center code, avoids debugging of the first docking interface, and isolates the docking protocol conversion relationship from the processing code.
Smart Images

Figure CN113342543B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a method, device, system and storage medium for connecting to an authentication center. Background Art
[0002] Currently, the website products of the same enterprise can be connected to the user center (or first authentication center) of the corresponding enterprise, and single sign-on of multiple website products of the same enterprise can be realized through the user center, that is, users only need to log in to any website product of the same enterprise to access other website products of the enterprise without logging in again. In some scenarios, users may visit website products of other enterprises, and the user authentication systems of website products of different enterprises may be different.
[0003] In related technologies, in order to achieve single sign-on between website products of multiple enterprises, a third-party unified user authentication system (or second authentication center) can be connected to the user center to achieve single sign-on between cross-enterprise website products.
[0004] However, different unified user authentication systems may have different docking protocols, docking access interfaces, docking user information, etc. For the user center, when docking with different unified user authentication systems, it is necessary to debug the docking one by one, which not only increases the amount of modification to the docking code, but also increases the complexity and maintenance difficulty of the docking code. Summary of the invention
[0005] The purpose of this application is to solve one of the above technical problems at least to a certain extent.
[0006] The present application proposes an authentication center docking method, device, system and storage medium to reduce the difficulty of maintaining the first authentication center code.
[0007] The first embodiment of the present application proposes a method for connecting an authentication center, which is applied to a first authentication center, including:
[0008] Obtain the docking reference information of the second authentication center;
[0009] Generating, according to the docking reference information, a second docking interface for docking with the second authentication center;
[0010] The docking between the first authentication center and the second authentication center is achieved according to the second docking interface and the first docking interface used for docking with the first authentication center.
[0011] The authentication center docking method of the embodiment of the present application obtains the docking reference information of the second authentication center; generates a second docking interface for docking with the second authentication center according to the docking reference information; and realizes the docking between the first authentication center and the second authentication center according to the second docking interface and the first docking interface for docking with the first authentication center. Therefore, since the first docking interface for docking with the first authentication center is fixed, the first authentication center does not need to debug the first docking interface, and the modification of the second docking interface and the protocol conversion relationship between the second docking interface and the first docking interface can be isolated from the processing code of the first authentication center, thereby reducing the difficulty of maintaining the code of the first authentication center.
[0012] The second embodiment of the present application proposes an authentication center docking device, which is applied to a first authentication center, including:
[0013] An acquisition module, used to acquire the docking reference information of the second authentication center;
[0014] A generating module, used for generating a second docking interface for docking with the second authentication center according to the docking reference information;
[0015] A docking module is used to realize the docking between the first authentication center and the second authentication center according to the second docking interface and the first docking interface for docking with the first authentication center.
[0016] The authentication center docking device of the embodiment of the present application obtains the docking reference information of the second authentication center; generates a second docking interface for docking with the second authentication center according to the docking reference information; and realizes the docking between the first authentication center and the second authentication center according to the second docking interface and the first docking interface for docking with the first authentication center. Therefore, since the first docking interface for docking with the first authentication center is fixed, the first authentication center does not need to debug the first docking interface, and the modification of the second docking interface and the protocol conversion relationship between the second docking interface and the first docking interface can be isolated from the processing code of the first authentication center, thereby reducing the difficulty of maintaining the code of the first authentication center.
[0017] The third aspect of the present application provides an authentication center docking system, including: a first authentication center and a second authentication center;
[0018] The first authentication center achieves docking with the second authentication center through the authentication center docking method as described in the first aspect of the embodiment of the present application.
[0019] The fourth aspect of the present application proposes another authentication center docking system, including: a first authentication center, a docking server, and a second authentication center;
[0020] The docking server realizes the docking between the first authentication center and the second authentication center through the authentication center docking method as described in the first aspect of the embodiment of the present application.
[0021] The fifth aspect embodiment of the present application proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the authentication center docking method described in the first aspect of the present application.
[0022] The sixth aspect embodiment of the present application proposes a computer program product, including a computer program, which, when executed by a processor, implements the authentication center docking method proposed in the second aspect embodiment of the present application.
[0023] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0025] Figure 1 This is a schematic diagram of the connection between the user center and website products;
[0026] Figure 2 It is a structural schematic diagram of an existing docking system;
[0027] Figure 3 A flowchart of the authentication center connection method provided in Example 1 of the present application;
[0028] Figure 4 A flowchart of the authentication center connection method provided in Example 2 of the present application;
[0029] Figure 5 A flowchart of the authentication center connection method provided in Example 3 of the present application;
[0030] Figure 6 This is a schematic diagram of the login process in an embodiment of the present application;
[0031] Figure 7 A schematic diagram of the structure of the authentication center docking system provided in Example 4 of the present application;
[0032] Figure 8 A schematic diagram of the structure of the authentication center docking system provided in Example 5 of the present application;
[0033] Fig. 9 A schematic diagram of the structure of the authentication center docking system provided in Example 6 of the present application;
[0034] Fig.10 A schematic diagram of the structure of the authentication center docking device provided in Example 7 of the present application;
[0035] Fig.11 A schematic diagram of the structure of a first authentication center provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The embodiments of the present application are described in detail below, and 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 having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0037] At present, the website products of the same enterprise can be connected to the user center of the corresponding enterprise (or called the first authentication center), and single sign-on of multiple website products of the same enterprise can be achieved through the user center. That is, when a user logs in to any website product of the same enterprise and then visits other website products of the enterprise, there is no need to pop up the login page again and ask the user to enter the user name and password. This can simplify user operations and improve user experience.
[0038] As an example, the connection diagram between the user center and the website product can be as follows: Figure 1 As shown, multiple website products can be connected to the user center through different protocols such as the Open Authorization (OAuth) protocol and the Central Authentication Service (CAS) protocol, and the user center can realize unified login and user authorization among multiple website products.
[0039] However, in some scenarios, users may need to access website products of multiple companies, and website products of different companies have their own user authentication systems. In order to achieve single sign-on between website products of multiple companies, such as Figure 2 As shown, the third-party unified user authentication system (or second authentication center) can be connected to the user center to realize login authentication of users. After the user logs in to the unified user authentication system, he can access the website products of various enterprises without having to log in again, thus realizing single sign-on between the website products of various enterprises.
[0040] Among them, each enterprise's website products must be connected to a third-party unified user authentication system to achieve access between cross-enterprise website products.
[0041] For example, for the same bureau, or the same project environment, such as the XX City Big Data Bureau project, there will be website products from multiple companies, but there is only one unified user authentication system in the XX City Big Data Bureau, and user authentication for all companies can be based on the above unified user authentication system. After the website products of each company are connected to the unified user authentication system, single sign-on between cross-enterprise website products can be achieved.
[0042] However, since different unified user authentication systems may have different docking protocols, docking access interfaces, docking user information, etc., when the user center is docked with different unified user authentication systems, it is necessary to debug the docking one by one. In this case, the following problems may occur:
[0043] First, the user center needs to adapt and modify the docking code as the unified user authentication system changes, which not only increases the amount of docking code modification, but also increases the complexity and maintenance difficulty of the docking code;
[0044] Second, when the user center is upgraded, if there are major changes, or the upgrade affects the docking part, the docking code also needs to be modified accordingly, further increasing the amount of modification to the docking code.
[0045] In order to solve the above problems, the present application mainly provides a method for docking an authentication center, by obtaining docking reference information of a second authentication center; generating a second docking interface for docking with the second authentication center according to the docking reference information; and realizing docking between the first authentication center and the second authentication center according to the second docking interface and the first docking interface for docking with the first authentication center. Thus, since the first docking interface for docking with the first authentication center is fixed, the first authentication center does not need to debug the first docking interface, and the modification of the second docking interface and the protocol conversion relationship between the second docking interface and the first docking interface can be isolated from the processing code of the first authentication center, thereby reducing the difficulty of maintaining the code of the first authentication center.
[0046] The following describes the authentication center docking method, device, system and storage medium of the embodiments of the present application with reference to the accompanying drawings.
[0047] Figure 3 A flow chart of the authentication center docking method provided in Example 1 of the present application.
[0048] The authentication center docking method of the embodiment of the present application can be applied to a docking service component, which can be embedded in the first authentication center, or the docking service component can be set independently of the first authentication center and the second authentication center. For example, the docking service component can be set on a docking server, and the present application does not impose any restrictions on this.
[0049] As an example, when the docking service component is embedded in the first authentication center, the docking service component can be embedded in the first authentication center as a static database lib, and exist as an independent code in the first authentication center. When it is finally deployed, it can be packaged as a deliverable with the interactive parts of the first authentication center, rather than existing in the form of an independent service.
[0050] It should be understood that when the docking service component is set up independently of the first authentication center and the second authentication center, for example, the docking service component is set up on the docking server, it is more convenient for the final delivery and deployment of the docking system, and the first authentication center or the docking service component can be upgraded independently.
[0051] For the sake of ease of explanation, this application will subsequently only use the example of embedding the docking service component into the first authentication center as an example, that is, the authentication center docking method is applied to the first authentication center as an example.
[0052] like Figure 3 As shown, the authentication center docking method may include the following steps:
[0053] Step 301, obtain the docking reference information of the second authentication center.
[0054] In the embodiment of the present application, the second authentication center is a user authentication center or user authentication system different from the first authentication center. For example, the first authentication center may be a user center corresponding to a certain enterprise, and the second authentication center may be a unified user authentication system of a third party.
[0055] In an embodiment of the present application, the docking service component or the first authentication center can obtain the docking reference information of the second authentication center, wherein the docking reference information of the second authentication center may include authentication mode, docking protocol, docking port and other information.
[0056] Among them, the authentication mode may include at least one of the following modes: dual-center authentication mode, second authentication center authentication jump mode, and second authentication center authentication mode.
[0057] Among them, the dual-center authentication mode is also called the dual-end authentication mode or the dual-entry login mode, that is, the login page has two entrances. When users access website products, they can choose to log in from the second authentication center (such as a third-party unified user authentication system) or from the first authentication center (such as the user center) of the enterprise corresponding to the website product. In other words, in the dual-center authentication mode, the login authentication process can be performed by the first authentication center or the second authentication center.
[0058] The second authentication center authentication jump mode is also called the third-party portal jump mode, that is, the user can first log in from the second authentication center (such as a third-party unified user authentication system), and then click on the link of the website product, so that the user can jump to the website product without logging in. In other words, in the second authentication center authentication jump mode, the second authentication center can perform the login authentication process.
[0059] The second authentication center authentication mode is also called the third-party single login mode, that is, the login page is the login page of the second authentication center. In other words, in the second authentication center authentication mode, the login authentication process can be performed by the second authentication center.
[0060] The connection protocol may include but is not limited to Oauth2.0, CAS and other protocols.
[0061] Step 302: Generate a second docking interface for docking with a second authentication center based on the docking reference information.
[0062] In an embodiment of the present application, the docking service component can generate a second docking interface for docking with the second authentication center based on the docking reference information of the second authentication center.
[0063] Step 303, according to the second docking interface and the first docking interface for docking with the first authentication center, realize the docking between the first authentication center and the second authentication center.
[0064] In an embodiment of the present application, the docking service component can realize the docking between the first authentication center and the second authentication center based on the second docking interface and the first docking interface used to dock with the first authentication center.
[0065] It can be understood that when the authentication center docking method is applied to the first authentication center, the first docking interface used to dock with the first authentication center is fixed, and the first authentication center does not need to debug the first docking interface. In addition, the modification of the second docking interface and the protocol conversion relationship between the second docking interface and the first docking interface can be isolated from the processing code of the first authentication center, thereby reducing the difficulty of maintaining the code of the first authentication center.
[0066] It should be noted that when the docking service component is set independently of the first authentication center and the second authentication center, for example, the docking service component is set on the docking server, that is, when the authentication center docking method is applied to the docking server, the docking of the first authentication center and the second authentication center is achieved through the docking service component. The first authentication center does not need to perceive the difference between the second authentication center, so the first authentication center does not need to debug the docking, that is, there is no need to modify the docking code, which can reduce the workload of the first authentication center, as well as reduce the complexity and maintenance difficulty of the docking code.
[0067] The authentication center docking method of the embodiment of the present application obtains the docking reference information of the second authentication center; generates a second docking interface for docking with the second authentication center according to the docking reference information; and realizes the docking between the first authentication center and the second authentication center according to the second docking interface and the first docking interface for docking with the first authentication center. Therefore, since the first docking interface for docking with the first authentication center is fixed, the first authentication center does not need to debug the first docking interface, and the modification of the second docking interface and the protocol conversion relationship between the second docking interface and the first docking interface can be isolated from the processing code of the first authentication center, thereby reducing the difficulty of maintaining the code of the first authentication center.
[0068] In order to clearly illustrate how the above embodiment realizes the connection between the first authentication center and the second authentication center, the present application provides another authentication center connection method.
[0069] Figure 4 A flow chart of the authentication center docking method provided in Example 2 of the present application.
[0070] It should be noted that the authentication center docking method can be executed alone, or it can be executed in combination with any embodiment in the present application or a possible implementation method in the embodiment, or it can be executed in combination with any technical solution in the relevant technology, and the present application does not impose any restrictions on this.
[0071] like Figure 4 As shown, the authentication center docking method may include the following steps:
[0072] Step 401, obtaining docking reference information of the second authentication center, wherein the docking reference information includes: authentication mode, docking protocol and docking port.
[0073] In the embodiment of the present application, step 401 can be implemented in any way in the embodiments of the present application. The embodiment of the present application does not limit this and will not be repeated.
[0074] Step 402: Obtain a docking interface template corresponding to the authentication mode.
[0075] In an embodiment of the present application, different docking interface templates can be pre-prepared for different authentication modes, and a correspondence between the authentication mode and the docking interface template can be established. Therefore, in the present application, the above correspondence can be queried based on the authentication mode in the docking reference information of the second authentication center to determine the docking interface template corresponding to the authentication mode in the docking reference information.
[0076] Step 403: Process the docking template according to the docking protocol and the docking port to generate a second docking interface for docking with the second authentication center.
[0077] In an embodiment of the present application, the docking template can be processed according to the docking protocol and docking port in the docking reference information to generate a second docking interface for docking with the second authentication center. That is to say, in the present application, the docking template can be quickly docked and developed according to the docking protocol and docking port supported by the second authentication center to generate a second docking interface for docking with the second authentication center.
[0078] Step 404, according to the second docking interface and the first docking interface for docking with the first authentication center, realize the docking between the first authentication center and the second authentication center.
[0079] In an embodiment of the present application, after generating a second docking interface for docking with a second authentication center, the docking between the first authentication center and the second authentication center can be achieved based on the second docking interface and the first docking interface.
[0080] The authentication center docking method of the embodiment of the present application obtains a docking interface template corresponding to the authentication mode in the docking reference information of the second authentication center, processes the docking template according to the docking protocol and the docking port in the docking reference information, and generates a second docking interface for docking with the second authentication center. In this way, it is possible to quickly develop a second docking interface for docking with the second authentication center based on the docking template, thereby improving the docking efficiency between the first authentication center and the second authentication center.
[0081] It is understandable that the purpose of the connection between the first authentication center and the second authentication center is to use the first authentication center or the second authentication center to perform unified login authentication or login authentication on the user. Among them, when the authentication mode is different, the unified login authentication or login authentication process is different. The above process is described in detail below in conjunction with Example 3.
[0082] Figure 5 This is a flow chart of the authentication center docking method provided in Example 3 of the present application.
[0083] It should be noted that the authentication center docking method can be executed alone, or it can be executed in combination with any embodiment in the present application or a possible implementation method in the embodiment, or it can be executed in combination with any technical solution in the relevant technology, and the present application does not impose any restrictions on this.
[0084] like Figure 5 As shown, the authentication center docking method may include the following steps:
[0085] Step 501, obtain the docking reference information of the second authentication center.
[0086] Among them, the docking reference information includes: authentication mode, docking protocol and docking port; the authentication mode includes at least one of the following modes: dual-center authentication mode, second authentication center authentication jump mode, second authentication center authentication mode.
[0087] Step 502: Generate a second docking interface for docking with a second authentication center based on the docking reference information.
[0088] In the embodiment of the present application, steps 501 to 502 can be implemented in any of the ways in the embodiments of the present application respectively. The embodiment of the present application does not limit this and will not be described in detail.
[0089] Step 503, when the authentication mode is the second authentication center authentication jump mode or the second authentication center authentication mode, the first user information of the first authentication center is obtained through the first docking interface used to dock with the first authentication center.
[0090] In an embodiment of the present application, the first user information may include account name, password, device ID, user ID and other information used for login authentication.
[0091] Step 504: Perform protocol conversion on the first user information according to the docking protocol of the second authentication center, and update the first user information after protocol conversion to the second authentication center through the second docking interface for unified login authentication.
[0092] In an embodiment of the present application, when the authentication mode is the second authentication center authentication jump mode or the second authentication center authentication mode, the login authentication process can be performed through the second authentication center.
[0093] It can be understood that the prerequisite for the second authentication center to perform the login authentication process is that the second authentication center has pre-saved the corresponding user information, so that the second authentication center can perform login authentication on the user based on the corresponding user information. Therefore, in the embodiment of the present application, the user information input or selected by the user through the first authentication center can be obtained through the first docking interface, which is recorded as the first user information in this application, or the first user information stored in the first authentication center can be obtained through the first docking interface, and the first user information is converted according to the docking protocol of the second authentication center to obtain the first user information after the protocol conversion, and the first user information after the protocol conversion is updated to the second authentication center through the second docking interface, so that the second authentication center can perform unified login authentication based on the first user information.
[0094] As an example, when a user visits any website product connected to the first authentication center, the first authentication center can store corresponding user information, which is recorded as the first user information in this application. In order to achieve single sign-on, when the first authentication center and the second authentication center are connected, if the authentication mode is the second authentication center authentication jump mode or the second authentication center authentication mode, the first user information stored in the first authentication center can be forwarded to the second authentication center, so that the second authentication center can perform login authentication on the user based on the first user information.
[0095] Furthermore, after the second authentication center obtains the first user information, it can execute the login authentication process according to the first user information, that is, after step 504, it can also trigger the execution of steps 505 to 506.
[0096] Step 505: Obtain a first user login authentication request through the first docking interface.
[0097] In an embodiment of the present application, the first user login authentication request may include a user identifier, and the first user login authentication request may be a request sent by a website product to be visited connected to the first authentication center when the user corresponding to the user identifier is not logged in.
[0098] In order to distinguish the website products connected to the first authentication center and the website products connected to the second authentication center, in this application, the website products connected to the first authentication center can be referred to as the first website products, and the website products connected to the second authentication center can be referred to as the second website products, that is, the first authentication center can be connected to multiple first website products, and the second authentication center can be connected to multiple second website products, wherein the multiple first website products can be website products corresponding to the same enterprise, and the multiple second website products can include website products of different enterprises, wherein the multiple second website products can include multiple first website products.
[0099] As an example, when a user visits a first website product, if the user has not logged in to the first website product, the first website product may send a first user login authentication request to a first authentication center.
[0100] Step 506: Perform protocol conversion on the first user login authentication request according to the docking protocol of the second authentication center, and forward the first user login authentication request after protocol conversion to the second authentication center for login authentication.
[0101] In an embodiment of the present application, the first authentication center can send the first user login authentication request to the second authentication center through the docking service component. Specifically, the docking service component can obtain the first user login authentication request through the first docking interface, and perform protocol conversion on the first user login authentication request according to the docking protocol of the second authentication center, and forward the first user login authentication request after the protocol conversion to the second authentication center for login authentication.
[0102] Step 507, when the authentication mode is a dual-center authentication mode, the first user information of the first authentication center is obtained through the first docking interface; the first user information is converted according to the docking protocol of the second authentication center, and the first user information after the protocol conversion is updated to the second authentication center through the second docking interface for unified login authentication; and, the second user information of the second authentication center is obtained through the second docking interface; the second user information is converted according to the docking protocol of the first authentication center, and the second user information after the protocol conversion is updated to the first authentication center through the first docking interface for unified login authentication.
[0103] In an embodiment of the present application, when the authentication mode is a dual-center authentication mode, the login authentication process can be performed by the first authentication center, or the login authentication process can be performed by the second authentication center. If the login authentication process is performed by the second authentication center, the first user information of the first authentication center can be obtained through the first docking interface as in steps 503 and 504, and the first user information is converted according to the docking protocol of the second authentication center. The first user information after the protocol conversion is updated to the second authentication center through the second docking interface to perform unified login authentication.
[0104] Similarly, if the login authentication process is performed by the first authentication center, the second user information of the second authentication center can be obtained through the second docking interface, and the second user information can be converted according to the docking protocol of the first authentication center. The second user information after the protocol conversion can be updated to the first authentication center through the first docking interface for unified login authentication.
[0105] As an example, when a user visits any second website product connected to a second authentication center, the second authentication center may store corresponding user information, which is recorded as second user information in this application. In order to achieve single sign-on, when the first authentication center and the second authentication center are connected, if the authentication mode is a dual-center authentication mode, such as the login authentication process is performed by the first authentication center, the second user information stored in the second authentication center may be forwarded to the first authentication center, so that the first authentication center can perform login authentication on the user based on the second user information.
[0106] Furthermore, in a possible implementation method of an embodiment of the present application, after the second authentication center obtains the first user information, and after the first authentication center obtains the second user information, the second authentication center can execute the login authentication process based on the first user information, or the first authentication center can execute the login authentication process based on the second user information, that is, after step 507, step 508 can also be triggered.
[0107] Step 508: obtaining, through the first docking interface, a first user login authentication request when the user selects authentication by the second authentication center; performing protocol conversion on the first user login authentication request according to the docking protocol of the second authentication center, and forwarding the first user login authentication request after the protocol conversion to the second authentication center for login authentication; or, obtaining, through the second docking interface, a second user login authentication request when the user selects authentication by the first authentication center; performing protocol conversion on the second user login authentication request according to the docking protocol of the first authentication center, and forwarding the second user login authentication request after the protocol conversion to the first authentication center for login authentication.
[0108] In an embodiment of the present application, similar to steps 505 and 506, the first user login authentication request may include a user identifier, and the first user login authentication request may be a request sent by the website product to be visited connected to the first authentication center when the user corresponding to the user identifier is not logged in.
[0109] Similarly, the second user login authentication request may also include a user identifier, and the second user login authentication request may be a request sent by the website product to be visited connected to the second authentication center when the user corresponding to the user identifier is not logged in.
[0110] In an embodiment of the present application, when the user chooses authentication by the second authentication center, the first authentication center can send the first user login authentication request to the second authentication center through the docking service component. Specifically, the docking service component can obtain the first user login authentication request through the first docking interface, and perform protocol conversion on the first user login authentication request according to the docking protocol of the second authentication center, and forward the first user login authentication request after the protocol conversion to the second authentication center for login authentication.
[0111] Similarly, when the user chooses authentication by the first authentication center, the second authentication center can send the second user login authentication request to the first authentication center through the docking service component. Specifically, the docking service component can obtain the second user login authentication request through the second docking interface, and perform protocol conversion on the second user login authentication request according to the docking protocol of the first authentication center, and forward the second user login authentication request after the protocol conversion to the first authentication center for login authentication.
[0112] As an example, the accounts of multiple second website products connected to the second authentication center may be associated or the same. When a user visits one of the second website products, the second authentication center can store the corresponding user information or login record. Therefore, when the user visits other second website products connected to the second authentication center (the other second website products visited at this time may be the first website products connected to the first authentication center), assuming that the login authentication process is performed by the first authentication center, the first authentication center has obtained the user information or login record of the second authentication center in advance. According to the above user information or login record, it can be determined that the user has logged in, that is, it is determined that the login authentication has passed, so the user does not need to log in again. When the user does not visit any second website product, since the second authentication center does not store the corresponding user information or login record, the first authentication center can determine that the user has not logged in, that is, the login authentication has not passed, so it can return to the login page, and the user can enter the corresponding account information and password information.
[0113] As an application scenario, when a user logs in to the website product of enterprise 1, he can jump to the login page of the second authentication center for login verification, where the login process can be as follows: Figure 6 As shown, the user can enter the access address of the website product A of enterprise 1 in the browser (step 1). If website product A finds that the user is not logged in, it can redirect to the address of the first authentication center (such as the user center) corresponding to enterprise 1 (step 2). If the first authentication center finds that the user is not logged in either, it can continue to jump to the docking service component (step 3). The docking service component determines that the user is not logged in, and can continue to jump to the second authentication center (step 4). The second authentication center can provide a login page for the user to enter a user name and password, or provide other authentication methods, such as DingTalk, WeChat, etc. login pages (step 5). After the user enters the username and password and logs in successfully, it can be redirected to the address of the docking service component (step 6). The docking service component obtains the user login authentication record, completes its own login, and jumps to the first authentication center corresponding to enterprise 1 at the same time (step 7). The first authentication center corresponding to enterprise 1 then jumps to the page of website product A, thereby realizing login access to the website product A page.
[0114] The authentication center docking method of the embodiment of the present application can improve the reliability of the login authentication results by executing different login authentication processes for different authentication modes, thereby improving the user experience.
[0115] In order to implement the above embodiments, the present application also proposes an authentication center docking system.
[0116] The authentication center docking system of the embodiment of the present application may include: a first authentication center and a second authentication center.
[0117] Among them, the first authentication center achieves docking with the second authentication center through the authentication center docking method proposed in any of the above embodiments.
[0118] That is to say, the present application uses the docking service component in the above method embodiment as an example embedded in the first authentication center.
[0119] It should be noted that the explanation of the authentication center docking method in the aforementioned embodiment is also applicable to the authentication center docking system in this embodiment. The implementation principle is similar and will not be repeated here.
[0120] In order to implement the above embodiments, the present application also proposes an authentication center docking system.
[0121] Figure 7 This is a structural diagram of the authentication center docking system provided in Example 4 of the present application.
[0122] like Figure 7 As shown, the authentication center docking system may include: a first authentication center 100, a docking server 200 and a second authentication center 300.
[0123] Among them, the docking server 200 realizes the docking between the first authentication center 100 and the second authentication center 300 through the authentication center docking method proposed in any of the above embodiments.
[0124] That is to say, Figure 7 The docking service component in the above method embodiment is set up 300 independently of the first authentication center 100 and the second authentication center for example, that is, the docking service component is set up on the docking server 200 for example.
[0125] It should be noted that the explanation of the authentication center docking method in the aforementioned embodiment is also applicable to the authentication center docking system in this embodiment. The implementation principle is similar and will not be repeated here.
[0126] As a possible implementation method, for any of the above embodiments, the number of the second authentication center can be at least one, and the above example only takes the number of the second authentication center as one.
[0127] In any one of the embodiments of the present application, the docking between a first authentication center and at least one second authentication center is achieved through a docking service component. As a result, the first authentication center does not need to perceive the difference between the second authentication center, and the first authentication center does not need to debug the docking, that is, there is no need to modify the docking code, which can reduce the workload of the first authentication center, as well as reduce the complexity and maintenance difficulty of the docking code.
[0128] In order to clearly illustrate any of the above embodiments, as an example, the first authentication center is used as the user center, and the second authentication center is used as the third party unified user authentication system. Figure 8 , can be connected to the user center and the unified user authentication system respectively through the docking service component, wherein only one unified user authentication system is used as an example, for example, when the method is applied to a project environment, such as the Ministry of Emergency Management, there is only one unified user authentication system. It should be understood that in different project environments, the unified user authentication system may be different.
[0129] Specifically, in order to ensure that the functions of the user center are not affected by changes in the unified user authentication system, the functions of the user center and the unified user authentication system can be separated out as an independent service, which is recorded as a docking service component (or can also be called a docking service) in this application. The docking service component implements the service-oriented and standardized docking functions of the third-party unified user authentication system, thereby speeding up the development progress of the user center docking and reducing the impact of the third-party unified user authentication system on the functions of the user center when docking with the user center.
[0130] like Figure 8 As shown, the docking process between the user center and the third-party unified user authentication system can be independently used as a general docking service component, and the docking service component realizes the docking between the user center and the unified user authentication system. In the docking system, the docking service component completes the interaction between the user center and the third-party unified user authentication system, so that the user center does not need to perceive the difference of the third-party unified user authentication system. In addition, the interface between the user center and the docking service component remains unchanged, so that the function or code of the user center is not changed by the difference of the third-party unified user authentication system.
[0131] In a possible implementation of an embodiment of the present application, the docking service component can support docking processing of different authentication protocols to adapt to the differences between different second authentication centers.
[0132] As an example, Fig. 9 As shown, the docking service component can support the docking processing of protocols such as Oauth2.0 and CAS. The docking service component and the first authentication center can be docked through the Oauth2.0 protocol, and the docking service component and the second authentication center can be docked through Oauth2.0 and CAS protocols. Therefore, for the functional development of the first authentication center and the functional development of the website products of the enterprise corresponding to the first authentication center, as long as it does not affect the docking of the Oauth2.0 protocol. In addition, the docking service component can support multiple user authentication protocols, which can enhance the scope of application. In addition, other authentication protocols can be expanded according to application requirements, and this application does not impose any restrictions on this.
[0133] In summary, the interfaces of the first authentication center and the docking service component only need to remain compatible. The interaction interface between the first authentication center and the docking service component is well defined. For the first authentication center, the iterative development of its functions only needs to not affect the interaction interface, thereby achieving decoupling of the first authentication center and the docking service component. Even if the functions of the first authentication center itself are iterated, it will not affect the docking function between it and the second authentication center, thereby avoiding modifying the docking code and further reducing the complexity and maintenance difficulty of the code.
[0134] It is understandable that, since the docking protocols, docking access interfaces, docking user information, etc. of different second authentication centers may be different, in order to implement the login authentication process by the first authentication center or the second authentication center, in a possible implementation of the embodiment of the present application, the docking service component may include: a processing component connected to the first docking interface and the second docking interface respectively. Among them, the processing component is used to perform protocol conversion processing on the interactive information between the first authentication center and the second authentication center according to the protocol conversion strategy between the first authentication center and the second authentication center.
[0135] For example, assuming that the protocol connected to the first authentication center is the Oauth2.0 protocol, and the protocol connected to the second authentication center is the CAS protocol, for the interactive information sent by the first authentication center to the second authentication center (such as the first user information, the first user login authentication request, etc.), the processing component in the docking service component can convert the interactive information of the Oauth2.0 protocol into the interactive information of the CAS protocol, and for the interactive information sent by the second authentication center to the first authentication center (such as the second user information, the second user login authentication request, etc.), the processing component in the docking service component can convert the interactive information of the CAS protocol into the interactive information of the Oauth2.0 protocol.
[0136] As an application scenario, the second authentication center performs the login authentication process as an example, and the first authentication center is the user center corresponding to a certain enterprise, and the second authentication center is the third-party unified user authentication system as an example. Assuming that the user center is the user center corresponding to enterprise 1, the user center can be connected to the website products of enterprise 1. In addition to connecting to the website products of enterprise 1, the unified user authentication system can also be connected to the website products of other enterprises. For example, in the development project of enterprise 1, the website products of multiple enterprises may be involved. The unified user authentication system can be used to realize unified login authentication for the website products of multiple enterprises, that is, to realize single sign-on of the website products of multiple enterprises.
[0137] In a possible implementation of the embodiment of the present application, the first authentication center can be a candidate authentication server for multiple first website products, storing login authentication information of multiple first website product users. Thus, when a user only accesses the first website product, the first authentication center can perform login authentication on the user only.
[0138] For example, take the first authentication center as the user center corresponding to a certain enterprise. Assuming that the user center is the user center corresponding to enterprise 1, the user center can be connected to the website products of enterprise 1. When the user visits multiple website products corresponding to enterprise 1, the user center can realize single sign-on of the website products of enterprise 1.
[0139] Corresponding to the authentication center docking method provided in the above embodiment, an embodiment of the present application also provides an authentication center docking device. Since the authentication center docking device provided in the embodiment of the present application corresponds to the authentication center docking method provided in the above embodiment, the implementation method of the aforementioned authentication center docking method is also applicable to the authentication center docking device provided in this embodiment, and will not be described in detail in this embodiment.
[0140] Fig.10 This is a schematic diagram of the structure of the authentication center docking device provided in Example 7 of the present application. The authentication center docking device can be set in the docking service component in any of the above embodiments.
[0141] Among them, the docking service component can be embedded in the first authentication center, or the docking service component can be set independently of the first authentication center and the second authentication center. For example, the docking service component can be set on the docking server, and this application does not impose any restrictions on this.
[0142] For the sake of ease of explanation, this application will subsequently only use the example of the docking service component being embedded in the first authentication center, that is, the example of the authentication center docking device being applied to the first authentication center.
[0143] like Fig.10 As shown, the authentication center docking device 1000 includes: an acquisition module 1001, a generation module 1002 and a docking module 1003.
[0144] Among them, the acquisition module 1001 is used to obtain the docking reference information of the second authentication center.
[0145] The generation module 1002 is used to generate a second docking interface for docking with a second authentication center according to the docking reference information.
[0146] The docking module 1003 is used to realize the docking between the first authentication center and the second authentication center according to the second docking interface and the first docking interface for docking with the first authentication center.
[0147] As another possible implementation method of the embodiment of the present application, the docking reference information includes: authentication mode, docking protocol and docking port; generation module 1002 is specifically used to: obtain a docking interface template corresponding to the authentication mode; process the docking template according to the docking protocol and the docking port to generate a second docking interface.
[0148] As another possible implementation method of the embodiment of the present application, the authentication mode includes at least one of the following modes: dual-center authentication mode, second authentication center authentication jump mode, and second authentication center authentication mode.
[0149] As another possible implementation method of the embodiment of the present application, the authentication mode is a second authentication center authentication jump mode or a second authentication center authentication mode; the docking module 1003 is specifically used to: obtain the first user information of the first authentication center through the first docking interface; perform protocol conversion on the first user information according to the docking protocol of the second authentication center, and update the first user information after protocol conversion to the second authentication center through the second docking interface for unified login authentication.
[0150] As another possible implementation method of the embodiment of the present application, the docking module 1003 is also used to: obtain a first user login authentication request through a first docking interface; perform protocol conversion on the first user login authentication request according to the docking protocol of the second authentication center, and forward the first user login authentication request after the protocol conversion to the second authentication center for login authentication.
[0151] As another possible implementation method of the embodiment of the present application, the authentication mode is a dual-center authentication mode; the docking module 1003 is specifically used to: obtain the first user information of the first authentication center through the first docking interface; perform protocol conversion on the first user information according to the docking protocol of the second authentication center, and update the first user information after the protocol conversion to the second authentication center through the second docking interface for unified login authentication; and obtain the second user information of the second authentication center through the second docking interface; perform protocol conversion on the second user information according to the docking protocol of the first authentication center, and update the second user information after the protocol conversion to the first authentication center through the first docking interface for unified login authentication.
[0152] As another possible implementation method of the embodiment of the present application, the docking module 1003 is also used to: obtain a first user login authentication request through a first docking interface when the user selects authentication by a second authentication center; perform protocol conversion on the first user login authentication request according to the docking protocol of the second authentication center, and forward the first user login authentication request after the protocol conversion to the second authentication center for login authentication; or obtain a second user login authentication request through a second docking interface when the user selects authentication by the first authentication center; perform protocol conversion on the second user login authentication request according to the docking protocol of the first authentication center, and forward the second user login authentication request after the protocol conversion to the first authentication center for login authentication.
[0153] The authentication center docking device provided in the embodiment of the present application obtains the docking reference information of the second authentication center; generates a second docking interface for docking with the second authentication center according to the docking reference information; and realizes the docking between the first authentication center and the second authentication center according to the second docking interface and the first docking interface for docking with the first authentication center. Therefore, since the first docking interface for docking with the first authentication center is fixed, the first authentication center does not need to debug the first docking interface, and the modification of the second docking interface and the protocol conversion relationship between the second docking interface and the first docking interface can be isolated from the processing code of the first authentication center, thereby reducing the difficulty of maintaining the code of the first authentication center.
[0154] In order to implement the above embodiment, the present application also proposes a first authentication center, Fig.11 A schematic diagram of the structure of a first authentication center provided in an embodiment of the present application. The first authentication center may include:
[0155] A memory 1101 , a processor 1102 , and a computer program stored in the memory 1101 and executable on the processor 1102 .
[0156] When the processor 1102 executes the program, the authentication center docking method provided in any of the above embodiments is implemented.
[0157] Furthermore, the first authentication center may also include:
[0158] The communication interface 1103 is used for communication between the memory 1101 and the processor 1102 .
[0159] The memory 1101 is used to store computer programs that can be executed on the processor 1102 .
[0160] The memory 1101 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0161] Processor 1102 is used to implement the authentication center docking method provided in any of the above embodiments when executing the program.
[0162] If the memory 1101, the processor 1102 and the communication interface 1103 are implemented independently, the communication interface 1103, the memory 1101 and the processor 1102 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0163] Optionally, in a specific implementation, if the memory 1101, the processor 1102 and the communication interface 1103 are integrated on a chip, the memory 1101, the processor 1102 and the communication interface 1103 can communicate with each other through an internal interface.
[0164] The processor 1102 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0165] In order to implement the above embodiments, the embodiments of the present application also propose a non-temporary computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the authentication center docking method provided in any of the above embodiments is implemented.
[0166] In order to implement the above embodiments, the embodiments of the present application also propose a computer program product, which, when the instruction processor in the computer program product is executed, implements the authentication center docking method provided in any of the above embodiments.
[0167] It should be noted that the above explanation of the embodiment of the authentication center docking method is also applicable to the first authentication center, non-temporary computer-readable storage medium and computer program product proposed in the embodiment of the present application. The implementation principles are similar and will not be repeated here.
[0168] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0169] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0170] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0171] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0172] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0173] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0174] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0175] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for connecting an authentication center, applied to a first authentication center, characterized in that: Embedding a docking service component in the first authentication center, the method comprising: Obtaining docking reference information of a second authentication center through the docking service component, wherein the docking reference information includes: authentication mode, docking protocol and docking port, wherein the second authentication center is a unified user authentication system of a third party; Acquire a docking interface template corresponding to the authentication mode, and process the docking interface template according to the docking protocol and the docking port to generate a second docking interface for docking with the second authentication center; When the authentication mode is the second authentication center authentication jump mode or the second authentication center authentication mode, the first user information of the first authentication center is obtained through the first docking interface used to dock with the first authentication center, and the first user information is converted according to the docking protocol of the second authentication center. The first user information after the protocol conversion is updated to the second authentication center through the second docking interface to perform unified login authentication and realize single sign-on to website products of other enterprises, wherein the first authentication center is the user center corresponding to the enterprise, the user center corresponding to the enterprise corresponds to multiple first user information, and the first docking interface used to dock with the first authentication center is fixed.
2. The method according to claim 1, characterized in that The authentication mode also includes: a dual-center authentication mode.
3. The method according to claim 1, characterized in that The method further comprises: Obtaining a first user login authentication request through the first docking interface; The first user login authentication request is converted into a protocol according to the docking protocol of the second authentication center, and the first user login authentication request after the protocol conversion is forwarded to the second authentication center for login authentication.
4. The method according to claim 2, characterized in that: When the authentication mode is a dual-center authentication mode, the first user information of the first authentication center is obtained through the first docking interface; the first user information is converted according to the docking protocol of the second authentication center, and the first user information after the protocol conversion is updated to the second authentication center through the second docking interface to perform unified login authentication; as well as, Acquire the second user information of the second authentication center through the second docking interface; The second user information is converted into a protocol according to the docking protocol of the first authentication center, and the second user information after the protocol conversion is updated to the first authentication center through the first docking interface for unified login authentication.
5. The method according to claim 4, characterized in that The method further comprises: Obtaining, through the first docking interface, a first user login authentication request when the user selects a second authentication center for authentication; Performing protocol conversion on the first user login authentication request according to the docking protocol of the second authentication center, and forwarding the first user login authentication request after protocol conversion to the second authentication center for login authentication; or, Obtaining, through the second docking interface, a second user login authentication request when the user selects the first authentication center for authentication; The second user login authentication request is converted into a protocol according to the docking protocol of the first authentication center, and the second user login authentication request after the protocol conversion is forwarded to the first authentication center for login authentication.
6. An authentication center docking device, applied to a first authentication center, characterized in that: A docking service component is embedded in the first authentication center, and the device includes: An acquisition module, used to acquire docking reference information of a second authentication center through the docking service component, wherein the docking reference information includes: authentication mode, docking protocol and docking port, wherein the second authentication center is a unified user authentication system of a third party; A generation module, used to obtain a docking interface template corresponding to the authentication mode, and process the docking interface template according to the docking protocol and the docking port to generate a second docking interface for docking the second authentication center; A docking module is used to obtain the first user information of the first authentication center through the first docking interface for docking with the first authentication center when the authentication mode is the second authentication center authentication jump mode or the second authentication center authentication mode, perform protocol conversion on the first user information according to the docking protocol of the second authentication center, and update the first user information after the protocol conversion to the second authentication center through the second docking interface to perform unified login authentication and realize single sign-on to website products of other enterprises, wherein the first authentication center is the user center corresponding to the enterprise, the user center corresponding to the enterprise corresponds to multiple first user information, and the first docking interface for docking with the first authentication center is fixed, wherein the first authentication center is the user center corresponding to the enterprise, the user center corresponding to the enterprise corresponds to multiple first user information, and the first docking interface for docking with the first authentication center is fixed.
7. An authentication center docking system, characterized in that: include: The first certification center and the second certification center; The first authentication center achieves docking with the second authentication center through the authentication center docking method as described in any one of claims 1-5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, the authentication center docking method as described in any one of claims 1-5 is implemented.
Citation Information
Patent Citations
A mobile terminal safety management and control system and an implementation method
CN108989306A
Secure cross-domain login method, system and server
CN112333198A
Cross-platform authentication method for integrated system and related components
CN112637113A