Inter-application authentication method, device and readable storage medium

Through the unified authentication center and session token mechanism, the account synchronization problem of cross-application login under multiple authentication centers or application platforms is solved, the uniqueness and security of the account system are realized, user data management is simplified, and development efficiency is improved. Ease of system maintenance.

CN118381626BActive Publication Date: 2024-12-20CHENGTONG DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410358404.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-27
Publication Date
2024-12-20
Estimated Expiration
2044-03-27

AI Technical Summary

Technical Problem

Under multiple authentication centers or application platforms, when implementing cross-application login, there are difficulties in maintaining multiple account systems and synchronizing user information, which affects development efficiency and system maintenance complexity.

Method used

User information verification is carried out through the unified authentication center, login verification is sent using a specific link, login request information is obtained and encrypted, session tokens are generated, identity authentication and permission management between different applications, and the uniqueness and security of the account system are ensured.

Benefits of technology

It simplifies the synchronization and maintenance of user data between multiple applications, reduces the complexity of system maintenance, improves management efficiency and security, and ensures the ease of maintenance and uniqueness of the account system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118381626B_ABST
    Figure CN118381626B_ABST
Patent Text Reader

Abstract

The present invention relates to an authentication method, device and readable storage medium between applications, belonging to the technical field of application authentication, and the method includes: a second application user accesses a sub-application of a first application based on a specific link, the sub-application of the first application obtains the login request information of the second application user, and sends the login request information to the authentication center of the first application; the authentication center of the first application sends a unified authentication request to the authentication center of the second application based on the login request information, the authentication center of the second application performs unified authentication on the login information according to the unified authentication request, and after the authentication is passed, sends identity information to the authentication center of the first application; the authentication center of the first application returns the identity information to the sub-application of the first application, the sub-application of the first application performs login verification based on the user information, and after the login verification is passed, displays the request page. This scheme has the effect of realizing multi-application authentication under multiple authentication centers or application platforms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of application authentication, and in particular to an authentication method, device and readable storage medium between applications. Background Art

[0002] As the number of Internet application products increases, the number of application accounts registered by users increases, and the user information corresponding to each account is not necessarily the same. Accordingly, the user information obtained by the servers providing the corresponding application services is not accurate enough, so the cross-application login method has emerged.

[0003] Currently, the method to achieve cross-application login is the multi-application authentication method under the same authentication center or application platform. For example, Single Sign-On (SSO) technology allows users to access all authorized applications with only one login operation when using multiple applications.

[0004] However, for multi-application authentication methods with two or more authentication centers or application platforms, it is impossible to use the same account system to log in to multiple application platforms or application centers, or even sub-applications under multiple application platforms. In today's era of widespread application of microservices, maintaining multiple account systems means the need to keep accounts in different account systems synchronized, which adds an extra burden to operations and maintenance and seriously affects the development efficiency of new systems. Summary of the invention

[0005] The technical problem to be solved by the present invention is to realize a multi-application authentication method under multiple authentication centers or application platforms.

[0006] The technical solution of the present invention to solve the above technical problems is as follows:

[0007] In a first aspect, the present application provides an inter-application authentication method, which is applied to a sub-application of a first application and adopts the following technical solution:

[0008] An inter-application authentication method, applied to a sub-application of a first application, the method comprising:

[0009] In response to a page access request sent by a second application user based on a specific link, performing login verification on the second application user, the specific link being used to trigger a sub-application of the first application to perform login verification;

[0010] If the second application user login verification fails, redirecting the second application user to the login page of the first application;

[0011] Obtaining login request information input by the user of the second application through the login page, and sending the login request information to the authentication center of the first application, the login request information including the account name, password and unified authentication identifier;

[0012] Obtaining user information returned by the authentication center of the first application according to the login request information, so as to perform login verification based on the user information;

[0013] If the second application user login verification is passed, the request page is displayed to the second application user.

[0014] The beneficial effects of the present invention are: the user information of the second application is verified through the authentication center, and only the second application user who has been authorized and authenticated can access the sub-application of the first application and the first application. User information management is performed through a unified authentication center, which simplifies the synchronization and maintenance of user data between multiple applications. The unified login verification process reduces the complexity of system maintenance, improves the efficiency and accuracy of management, realizes a multi-application authentication method under multiple authentication centers or application platforms, ensures the uniqueness of the account system, and makes the account system easy to maintain.

[0015] Further, sending the login request information to the authentication center of the first application includes:

[0016] The login request is encrypted based on a first preset public key, and the encrypted login request information is sent to an authentication center of the first application, where the first preset public key is a public key of the authentication center of the first application.

[0017] The beneficial effect of adopting the above further solution is: asymmetric encryption is used to ensure that the login request information is encrypted during transmission, preventing the data from being intercepted or tampered with during transmission, and ensuring that the login request information is indeed sent to the authentication center of the first application instead of being redirected to other malicious servers.

[0018] Further, the logging in based on the user information includes:

[0019] A session token is generated based on the user information to log in according to the session token, where the session token is used to identify the session state of the second application user.

[0020] The beneficial effects of adopting the above further scheme are: the session token is a unique identifier assigned by the system to the user after the user logs in, and it is used to verify the user's identity and session status in subsequent requests. Compared with the traditional authentication method based on username and password, the use of session tokens can reduce the security risks caused by password leakage or guessing. The use of session tokens allows users to access different parts of the application or perform different operations within a period of time without repeated login. This reduces the trouble of users frequently entering usernames and passwords, and improves the ease of use and user experience of the application. Through the session token, the system can easily track and manage the user's session status. For example, the system can determine whether the user is logged in, whether the session has expired, etc. based on the session token, and take corresponding actions accordingly, such as automatically extending the session time or prompting the user to log in again.

[0021] In a second aspect, the present application provides an inter-application authentication method, which is applied to an authentication center of a first application and adopts the following technical solution:

[0022] Obtaining login request information sent by a sub-application of the first application, wherein the login request information includes an account name, a password, and a unified authentication identifier;

[0023] Based on the login request information, a unified authentication request is sent to the authentication center of the second application, where the unified authentication request carries an authorization information identifier, and the authorization information identifier is used to authorize the authentication center of the second application to verify the unified authentication request;

[0024] Obtaining an authorization code sent by the authentication center of the second application based on the authorization information identifier;

[0025] Based on the authorization code, generate a first request, and based on the first request, obtain verification information from an authentication center of the second application, the verification information including an access token;

[0026] Performing a first valid verification on the verification information, generating a second request based on the verification information after the first valid verification of the verification information passes, and obtaining identity information from an authentication center of the second application based on the second request, wherein the second request carries the access token and the account name;

[0027] The identity information is sent to a sub-application of the first application to perform login verification based on the user information.

[0028] The beneficial effects of the present invention are: user identity authentication and authority management between different applications are realized by interacting with the authentication center of the first application and the authentication center of the second application, and the authentication center can ensure the authenticity and reliability of the user identity by verifying the identity information sent by the authentication center of the second application. After the identity information is verified, the authentication center sends it to the sub-application of the first application to ensure that the sub-application can accurately identify and manage users, so that different applications can share user information, realize multiple application authentication methods under multiple authentication centers or application platforms, ensure the uniqueness of the account system, and make the account system easy to maintain.

[0029] Further, before sending a unified authentication request to the authentication center of the second application based on the login request information, and before the unified authentication request carries the authorization information identifier, it also includes:

[0030] A configuration request is sent to the authentication center of the second application, where the configuration request includes the application account of the first application.

[0031] The beneficial effect of adopting the above further solution is: before sending a unified authentication request, a connection is established with the authentication center of the second application through a configuration request, and key information such as the application account is transmitted, thereby realizing automatic configuration and authorization management between applications and facilitating development.

[0032] Further, the obtaining the login request information sent by the sub-application of the first application includes:

[0033] Decrypting the encrypted login request information sent by the sub-application of the first application based on a preset private key to obtain the login request information;

[0034] The sending a unified authentication request to an authentication center of the second application based on the login request information includes:

[0035] The unified authentication request is encrypted based on a second preset public key, and the encrypted unified authentication request is sent to the authentication center of the second application, where the second preset public key is the public key of the authentication center of the second application.

[0036] The beneficial effect of adopting the above further solution is: using the preset private key to decrypt the encrypted login request information ensures that only the authentication center holding the corresponding private key can correctly obtain the content of the login request information. This effectively prevents the data from being illegally intercepted and parsed during transmission.

[0037] In a third aspect, the present application provides an authentication method between applications, which is applied to the authentication center of the second application and adopts the following technical solution:

[0038] An inter-application authentication method, applied to an authentication center of a second application, the method comprising:

[0039] Obtain a unified authentication request sent by an authentication center of the first application, wherein the unified authentication request carries an authorization information identifier;

[0040] Performing identity authentication on the first application user based on the authorization information identifier, and generating an authorization code after the first application user passes the identity authentication;

[0041] Sending the authorization code to an authentication center of a first application, and receiving a first request sent by the authentication center of the first application based on the authorization code;

[0042] Performing a second validity verification on the first request, and generating verification information after the second validity verification of the first request passes, the verification information including an access token;

[0043] Obtain a second request generated by an authentication center of the first application based on the access token and the account name;

[0044] Perform a third validity verification on the second request. After the third validity verification of the second request passes, query the identity information associated with the account name based on the account name, and send the identity information to the authentication center of the first application to perform login verification based on the user information.

[0045] The beneficial effects of the present invention are as follows: the authentication center of the second application authenticates the user of the first application by verifying the authorization information identifier, thereby ensuring that only authorized users can access the resources of the second application, thereby effectively preventing unauthorized access and data leakage. In the process of identity authentication and request verification, the use of mechanisms such as authorization codes and access tokens further enhances the security and reliability of the authentication process and reduces potential security risks. By querying the identity information associated with the account name based on the account name, and sending the identity information to the authentication center of the first application, user identity management and information sharing across applications are realized, and a multi-application authentication method under multiple authentication centers or application platforms is realized, which ensures the uniqueness of the account system and makes the account system easy to maintain.

[0046] Furthermore, before the authentication center for obtaining the first application sends a unified authentication request, the method further includes:

[0047] Receive a configuration request sent by the authentication center of the first application, and add the application account of the first application to the authorization list.

[0048] The beneficial effect of adopting the above further solution is: before obtaining the unified authentication request, first establish contact with the authentication center of the second application through a configuration request, add key information such as the application account to the system, realize automatic configuration and authorization management between applications, and facilitate development.

[0049] In a fourth aspect, the present application provides an electronic device, which adopts the following technical solution:

[0050] An electronic device comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes the authentication method between applications described in any one of the first aspect, the second aspect and the third aspect.

[0051] In a fifth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:

[0052] A computer-readable storage medium stores a computer program that can be loaded by a processor and executes the inter-application authentication method described in any one of the first aspect, the second aspect, and the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 is a schematic diagram of an authentication method between applications of the present invention;

[0054] Figure 2 A schematic diagram of a flow chart of the inter-application authentication method of the present invention applied to a sub-application of a first application;

[0055] Figure 3 A schematic diagram of a flow chart of the inter-application authentication method of the present invention applied to an authentication center of a first application;

[0056] Figure 4 A schematic diagram of a flow chart of the inter-application authentication method of the present invention applied to an authentication center of a second application;

[0057] Figure 5 The figure is a structural block diagram of an electronic device of the present invention. DETAILED DESCRIPTION

[0058] The present application is further described in detail below in conjunction with the accompanying drawings.

[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0060] 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 the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0061] Figure 1 Schematic diagram of the authentication method between applications of the present invention.

[0062] like Figure 1 As shown, the second application user client accesses the page of the sub-application of the first application. Since the second application user is not logged in, the page of the sub-application of the first application requested by the second application user will be transferred to the first application. Since the second application user does not belong to the first application, it is impossible to directly complete the authentication with the first application to access the sub-application of the first application. It should be noted that the first application is a main application, and the first application has multiple sub-applications, which are sub-applications of the first application in this application. Each sub-application has different functions and permissions. For example, the first application can be a comprehensive online shopping platform, and the sub-applications of the first application can be a shopping cart management sub-application, an order management sub-application, and a product search sub-application. The second application is another independent application.

[0063] Figure 2 A flowchart of an inter-application authentication method applied to a sub-application of a first application provided in an embodiment of the present application.

[0064] like Figure 1 and Figure 2 As shown, the main process of the method is described as follows (steps S11 to S14):

[0065] Step S11, the sub-application of the first application performs login verification on the second application user in response to a page access request sent by the second application user based on a specific link, wherein the specific link is used to trigger the sub-application of the first application to perform login verification;

[0066] Step S12: if the second application user login verification fails, redirecting the second application user to the login page of the first application;

[0067] Step S13, obtaining login request information input by the user of the second application through the login page, and sending the login request information to the authentication center of the first application, the login request information including the account name, password and unified authentication identifier;

[0068] Step S14, obtaining the user information returned by the authentication center of the first application according to the login request information, so as to perform login verification based on the user information;

[0069] Step S15: If the second application user passes the login verification, the request page is displayed to the second application user.

[0070] In the implementation manner of the present application, the specific link is a URL pointing to a sub-application of the first application, which contains the parameters required to trigger login verification.

[0071] The second application user accesses the page of the sub-application of the first application through the client. The second application user can access it by clicking a specific link URL on the client. The specific link may be https: / / sub_app_b.com / index. The sub-application of the second application triggers an action in response to the specific link of the second application user, and performs login verification on the second application user. The login verification includes checking the user's session status, token or user information, etc.

[0072] If the login verification of the second application user fails (for example, the user is not logged in, or the login status has expired), the sub-application of the first application will redirect the second application user to the login page of the first application, which is a standard form page for the user to enter the account name, password and check the unified authentication.

[0073] On the login page, the second application user enters the login request information, which includes the account name, password, and a unified authentication identifier. The sub-application of the first application receives the login request information and sends the login request to the authentication center of the first application for verification. The request address can be https: / / app_b.com / bridge?username=username&type=remote_auth&redirect_url=http: / / sub_app_b.com / remote_auth.

[0074] The authentication center is a component responsible for processing login requests, verifying user identities, and authorizing access rights.

[0075] After receiving the login request information, the authentication center of the first application forwards it to the authentication center of the second application, and the authentication center of the second application performs verification operations, such as checking whether the account name and password match, and whether the user has the authority to access the requested resources. If the verification is successful, the authentication center of the second application will send user information (such as user name, user role, authority, etc.) to the authentication center of the first application, and the authentication center of the first application will return the user information to the sub-application. The sub-application performs login verification again based on the user information to ensure that the user has the right to access the requested page. Once the verification is successful, the sub-application will display the requested page to the second application user, and the sub-application generates a session token based on the user information to fill the login state according to the session token. The session token is used to identify the session state of the second application user. When the second application user logs in again, the login state can be filled by verifying the session token, and different parts of the application can be accessed or different operations can be performed without repeated login, which reduces the trouble of users frequently entering usernames and passwords and improves the ease of use and user experience of the application.

[0076] The session state refers to the interaction state and information between the user and the application during a specific user session, including the user's identity, permissions, session start time, end time, and operations performed by the user during the session.

[0077] It should be noted that during the transmission process, the first application, its sub-application, and the second application perform data transmission based on the HTTPS connection and agree on an encryption method, using asymmetric encryption. The public key of the first application will be issued to the second application, and the second application will use the public key to encrypt the transmitted information. After the first application receives the return value of the second application, it uses its own private key to perform decryption operations to obtain plain text information. The plain text format is stored in the json data format commonly used in requests.

[0078] Specifically, sending the login request information to the authentication center of the first application includes:

[0079] The sub-application of the first application encrypts the login request based on the first preset public key, and sends the encrypted login request information to the authentication center of the first application, where the first preset public key is the public key of the authentication center of the first application. The public key and private key are used to encrypt the transmission data through the https transmission method and asymmetric encryption of the data during the transmission process to ensure the security of the data transmission process.

[0080] Figure 3 A flowchart of an inter-application authentication method provided in an embodiment of the present application, applied to an authentication center of a first application.

[0081] like Figure 1and Figure 3 As shown, the main process of the method is described as follows (steps S21 to S26):

[0082] Step S21, obtaining login request information sent by a sub-application of the first application, wherein the login request information includes an account name, a password, and a unified authentication identifier;

[0083] Step S22: Based on the login request information, a unified authentication request is sent to the authentication center of the second application, wherein the unified authentication request carries an authorization information identifier, and the authorization information identifier is used by the authentication center of the second application to verify the source, authority and validity of the unified authentication request;

[0084] Step S23, obtaining an authorization code sent by the authentication center of the second application based on the authorization information identifier;

[0085] Step S24: generating a first request based on the authorization code, and obtaining verification information from an authentication center of the second application based on the first request, wherein the verification information includes an access token;

[0086] Step S25, performing a first valid verification on the verification information, generating a second request based on the verification information after the first valid verification of the verification information passes, and obtaining identity information from an authentication center of the second application based on the second request, wherein the second request carries the access token and the account name;

[0087] Step S26: Send the identity information to the sub-application of the first application to perform login verification based on the user information.

[0088] In an implementation manner of the present application, when a sub-application of the first application receives login request information from a user of the second application, the sub-application of the first application sends the login request information to the authentication center of the first application for processing. The sub-application of the first application receives the login request information, starts a unified authentication operation, and sends a unified authentication request to the authentication center of the first application. The request address may be https: / / app_a.com / oauth?type=code&redirect_url=https: / / app_b.com / remote_auth. The purpose of the request is to confirm the login status of the user. In order to ensure the security of the request, the request will carry an authorization information identifier, which is usually an encrypted token or signature used to verify the source and integrity of the request.

[0089] After receiving the unified authentication request, the authentication center of the second application will verify it based on the authorization information identifier. If the verification is successful, a code is sent back to the authentication center of the first application. The forwarding address can be https: / / app_b.com / remote_auth, and it carries a code parameter. The code is a random string with no length limit. The code is used to obtain the basis for obtaining the request token access_token from the authentication center of the second application. The code can only be used once and is transmitted in plain text.

[0090] After receiving the code, the authentication center of the second application will use it to generate a first request. This request is sent to the authentication center of the second application to obtain verification information, including access_token. Access token is a credential used to access protected resources, which has time validity and limited scope. Access_token is a random string that is saved by the authentication center of the second application and ensures that access_token is unique and valid for the first application to obtain user information. Access_token usually has an expiration time, such as 2 hours. After the access_token expires, the first application needs to obtain it again from the second application.

[0091] After the authentication center of the first application obtains the verification information, it performs a first effective verification to confirm the authenticity and validity of the information. If the verification is successful, the authentication center of the first application will generate a second request based on the verification information (especially the access token) and send it again to the authentication center of the second application. To obtain the user's identity information, such as user name, role, etc. In addition to carrying the access token, the second request will also include the account name so that the authentication center of the second application can accurately locate and return the corresponding identity information. After that, the authentication center of the first application will send the obtained identity information back to the sub-application of the first application. In this way, the sub-application can perform operations such as user login verification, authorization, and resource access control based on this information.

[0092] In this application, the premise that the authentication center of the first application forwards the unified authentication request of the user is that the first application has completed registration in the second application.

[0093] Specifically, before sending a unified authentication request to the authentication center of the second application based on the login request information, it also includes: sending a configuration request to the authentication center of the second application, the configuration request includes the application account of the first application and allows the authentication center of the second application to perform permission verification and configuration based on this account. After receiving the configuration request, the authentication center of the second application verifies whether the application account therein is valid. If the verification is successful, the relevant authorization information identifier is generated or obtained for the authentication center of the first application based on the configuration information of the account. The authorization information identifier is the key credential for subsequent unified authentication requests. After the configuration is completed, the authentication center of the second application sends a configuration response back to the authentication center of the first application. The response answer contains necessary information such as the authorization information identifier and configuration parameters so that the subsequent unified authentication request can proceed smoothly.

[0094] Further, the authentication center of the first application decrypts the encrypted login request information sent by the sub-application of the first application based on a preset private key to obtain the login request information;

[0095] The sending of a unified authentication request to the authentication center of the second application based on the login request information includes: encrypting the unified authentication request based on a second preset public key, and sending the encrypted unified authentication request to the authentication center of the second application, wherein the second preset public key is the public key of the authentication center of the second application.

[0096] Figure 4 A flowchart of an inter-application authentication method provided in an embodiment of the present application, applied to the authentication center of a second application.

[0097] like Figure 1 and Figure 4 As shown, the main process of the method is described as follows (steps S31 to S36):

[0098] Step S31, obtaining a unified authentication request sent by an authentication center of the first application, wherein the unified authentication request carries an authorization information identifier;

[0099] Step S32, performing identity authentication on the first application user based on the authorization information identifier, and generating an authorization code after the first application user passes the identity authentication;

[0100] Step S33, sending the authorization code to the authentication center of the first application, and receiving a first request sent by the authentication center of the first application based on the authorization code;

[0101] Step S34, performing a second validity verification on the first request, and generating verification information after the second validity verification of the first request passes, the verification information including an access token;

[0102] Step S35, obtaining a second request generated by the authentication center of the first application based on the access token and the account name;

[0103] Step S36, performing a third validity verification on the second request. After the third validity verification of the second request is passed, querying the identity information associated with the account name based on the account name, and sending the identity information to the authentication center of the first application to perform login verification based on the user information.

[0104] In the implementation mode of the present application, the authentication center of the second application receives a unified authentication request sent by the authentication center of the first application. The unified authentication request contains an authorization information identifier. After receiving the unified authentication request, the authentication center of the second application will authenticate the user of the first application based on the authorization information identifier. The authentication includes checking the user's account status, permissions and other information to ensure that the user is legal and has the right to log in across applications.

[0105] If the verification is successful, the authentication center will generate an authorization code, which is an important credential for obtaining verification information in subsequent steps. The authentication center of the second application will send it back to the authentication center of the first application. At the same time, the authentication center will be ready to accept the first request sent by the authentication center of the first application based on the authorization code. The first request is to obtain further verification information in order to complete the login verification across applications. When receiving the first request, the authentication center of the second application will perform a second effective verification on it, including checking the format of the request, the validity of the authorization code, etc. If the verification is successful, the authentication center will generate an access token. After generating the verification information, the authentication center of the second application will wait for the second request sent by the authentication center of the first application based on the access token and the account name. The account name is the unique identifier of the user. The second request is to obtain the identity information associated with the account name so that the first application can identify and manage the user. After receiving the second request, the authentication center of the second application will perform a second effective verification to ensure the validity and legitimacy of the request. If the verification is successful, the authentication center will query the corresponding identity information based on the account name and send this information back to the authentication center of the first application. In this way, the first application can complete the user's login verification and authorization operations based on this information. If the validation fails, an error is returned.

[0106] In the present application, before the authentication center of the second application obtains the unified authentication request sent by the authentication center of the first application, it also includes: receiving a configuration request sent by the authentication center of the first application, and adding the application account of the first application to the authorization list. Once the application account of the first application is successfully added to the authorization list, the configuration process is completed. Through such a configuration process, a trust relationship is established between the authentication centers of the two applications, and it is ensured that only authorized applications can initiate valid cross-application login verification requests. Automated configuration and authorization management between applications is achieved, and it is easy to develop.

[0107] This method implements user identity authentication and permission management between different applications by interacting with the authentication center of the first application and the authentication center of the second application. Only the second application user who has been authorized and authenticated can access the sub-applications of the first application and the first application. User information management is performed through a unified authentication center, which simplifies the synchronization and maintenance of user data between multiple applications. The unified login verification process reduces the complexity of system maintenance, improves the efficiency and accuracy of management, implements multi-application authentication methods under multiple authentication centers or application platforms, ensures the uniqueness of the account system, and makes the account system easy to maintain.

[0108] Figure 5 This is a structural block diagram of an electronic device 300 according to an embodiment of the present application.

[0109] like Figure 5 As shown, the electronic device 300 includes a processor 301 and a memory 302 , and may further include one or more of an information input / information output (I / O) interface 303 and a communication component 304 .

[0110] The processor 301 is used to control the overall operation of the electronic device 300 to complete all or part of the steps in the above-mentioned authentication method between applications; the memory 302 is used to store various types of data to support the operation of the electronic device 300, and these data may include, for example, instructions for any application or method used to operate on the electronic device 300, and application-related data. The memory 302 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), programmable read-only memory (Programmable Read-Only Memory, PROM), read-only memory (Read-Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0111] The I / O interface 303 provides an interface between the processor 301 and other interface modules, and the above-mentioned other interface modules can be keyboards, mice, buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 304 is used to test the wired or wireless communication between the electronic device 300 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 304 can include: Wi-Fi components, Bluetooth components, NFC components.

[0112] The communication bus 305 may include a path to transmit information between the above components. The communication bus 305 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus 305 may be divided into an address bus, a data bus, a control bus, etc.

[0113] The electronic device 300 can be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), digital signal processors (Digital Signal Processor, referred to as DSP), digital signal processing devices (Digital Signal Processing Device, referred to as DSPD), programmable logic devices (Programmable Logic Device, referred to as PLD), field programmable gate arrays (Field Programmable Gate Array, referred to as FPGA), controllers, microcontrollers, microprocessors or other electronic components, and is used to execute the authentication method between applications given in the above embodiment.

[0114] The electronic device 300 may include, but is not limited to, a mobile terminal such as a digital broadcast receiver, a PDA (Personal Digital Assistant), a PMP (Portable Multimedia Player), etc., and a fixed terminal such as a digital TV, a desktop computer, etc., and may also be a server, etc.

[0115] The computer-readable storage medium provided in the embodiments of the present application is introduced below. The computer-readable storage medium described below and the authentication method between applications described above can be referenced to each other.

[0116] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned authentication method between applications are implemented.

[0117] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0118] The terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not expressly listed, or also includes elements inherent to such process, method, article, or apparatus.

[0119] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of application involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the aforementioned application concept. For example, the above features are replaced with (but not limited to) technical features with similar functions applied in the present application.

Claims

1. An authentication method between applications, It is characterized in that Applied to an authentication center of a first application, the method comprises: Obtaining login request information sent by a sub-application of the first application, wherein the login request information includes an account name, a password, and a unified authentication identifier; Based on the login request information, a unified authentication request is sent to the authentication center of the second application, where the unified authentication request carries an authorization information identifier, and the authorization information identifier is used to authorize the authentication center of the second application to verify the unified authentication request; Obtaining an authorization code sent by the authentication center of the second application based on the authorization information identifier; Based on the authorization code, generate a first request, and based on the first request, obtain verification information from an authentication center of the second application, the verification information including an access token; Performing a first valid verification on the verification information, generating a second request based on the verification information after the first valid verification of the verification information passes, and obtaining identity information from an authentication center of the second application based on the second request, wherein the second request carries the access token and the account name; Sending the identity information to a sub-application of the first application to perform login verification based on the identity information; Based on the login request information, a unified authentication request is sent to the authentication center of the second application, and before the unified authentication request carries the authorization information identifier, the method further includes: A configuration request is sent to the authentication center of the second application, where the configuration request includes the application account of the first application.

2. The method for authentication between applications according to claim 1, It is characterized in that The obtaining the login request information sent by the sub-application of the first application includes: Decrypting the encrypted login request information sent by the sub-application of the first application based on a preset private key to obtain the login request information; The sending a unified authentication request to an authentication center of the second application based on the login request information includes: The unified authentication request is encrypted based on a second preset public key, and the encrypted unified authentication request is sent to the authentication center of the second application, where the second preset public key is the public key of the authentication center of the second application.

3. An authentication method between applications, It is characterized in that The authentication center applied to the second application is characterized in that the method comprises: Obtain a unified authentication request sent by an authentication center of the first application, wherein the unified authentication request carries an authorization information identifier; Performing identity authentication on the first application user based on the authorization information identifier, and generating an authorization code after the first application user passes the identity authentication; Sending the authorization code to an authentication center of a first application, and receiving a first request sent by the authentication center of the first application based on the authorization code; Performing a second validity verification on the first request, and generating verification information after the second validity verification of the first request passes, the verification information including an access token; Obtain a second request generated by an authentication center of the first application based on the access token and the account name; Performing a third validity verification on the second request, and after the third validity verification of the second request passes, querying identity information associated with the account name based on the account name, and sending the identity information to an authentication center of the first application to perform login verification based on the identity information; Before the authentication center of the first application is obtained to send a unified authentication request, the method further includes: Receive a configuration request sent by the authentication center of the first application, and add the application account of the first application to the authorization list.

4. An electronic device, It is characterized in that comprising a processor coupled to a memory; The processor is configured to execute a computer program stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 3.

5. A computer-readable storage medium, It is characterized in that The method comprises a computer program or an instruction, and when the computer program or the instruction is executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 3.