An identity authentication method, device, equipment and readable storage medium
The OTP microservice receives one-time passwords and user identification, generates verification information, and supports the user's own password selection algorithm, which solves the universality of the identity authentication solution and improves the security and applicability of identity authentication.
Patent Information
- Application Number
- CN202210763909.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-06-30
AI Technical Summary
The existing identity authentication scheme lacks universality and cannot be effectively connected and adapted between different systems, resulting in insufficient security and flexibility of identity authentication.
It provides an OTP microservice that can receive one-time passwords and user identifications of any identity authentication system, generate verification information, and support users to independently select password algorithms to realize the docking of multiple identity authentication systems and improve security.
It realizes the wide applicability and security of identity authentication, supports a variety of password algorithms, and improves the flexibility and security of identity authentication.
Smart Images

Figure CN115225281B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and particularly to an identity authentication method, apparatus, device, and readable storage medium. Background Art
[0002] Currently, various commonly used systems require users to register before use, which means that identity authentication needs to be performed when users log in subsequently. That is to say, user identity authentication may occur on various systems, indicating its application necessity and universality.
[0003] Therefore, how to provide a general identity authentication solution is a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide an identity authentication method, apparatus, device, and readable storage medium to provide a general identity authentication solution. The specific solutions are as follows:
[0005] In a first aspect, this application provides an identity authentication method applied to an OTP microservice. The OTP microservice is docked with at least one identity authentication system, including:
[0006] Receiving a one-time password and a user identifier sent by any identity authentication system;
[0007] Querying the private key and password algorithm corresponding to the user identifier; the private key is created by the OTP microservice in response to a registration request, and the password algorithm is independently selected by the target user with the user identifier when submitting the registration request;
[0008] Generating verification information based on the private key and the password algorithm, and verifying the one-time password using the verification information to obtain a verification result;
[0009] Returning the verification result to the current identity authentication system, so that the current identity authentication system sends the verification result to the client of the target user, and the client displays the verification result.
[0010] Optionally, before receiving the one-time password and the user identifier sent by any identity authentication system, it further includes:
[0011] Responding to the registration request of the target user sent by the current identity authentication system, and creating the private key;
[0012] Obtaining the user identifier and the password algorithm from the registration request;
[0013] Storing the user identifier, the password algorithm, and the private key;
[0014] Return the private key to the current identity authentication system, so that the current identity authentication system sends the private key to the client of the target user, and the client stores the private key, the user identifier, and the password algorithm.
[0015] Optionally, it further includes:
[0016] In response to the registration request, create QR code information corresponding to the user identifier;
[0017] Return the QR code information to the current identity authentication system, so that the current identity authentication system sends the QR code information to the client of the target user, and the client displays the QR code information.
[0018] Optionally, it further includes:
[0019] In response to the QR code update request sent by the current identity authentication system, update the QR code information;
[0020] Return the updated QR code information to the current identity authentication system, so that the current identity authentication system sends the updated QR code information to the client of the target user, and the client displays the updated QR code information.
[0021] Optionally, it further includes:
[0022] In response to the user deletion request sent by the current identity authentication system, delete the private key and the password algorithm;
[0023] Return a notification message indicating success or failure of the deletion to the current identity authentication system, so that the current identity authentication system sends the notification message indicating success or failure of the deletion to the client of the target user, and the client displays the notification message indicating success or failure of the deletion.
[0024] Optionally, different users independently select different password algorithms when submitting registration requests.
[0025] Optionally, the password algorithm is: SHA1, SHA256, SHA512, or SM3.
[0026] In a second aspect, the present application provides an identity authentication device applied to an OTP microservice, where the OTP microservice is docked with at least one identity authentication system, including:
[0027] A receiving module, configured to receive an one-time password and a user identifier sent by any identity authentication system;
[0028] A query module, configured to query the private key and the password algorithm corresponding to the user identifier; the private key is created by the OTP microservice in response to a registration request, and the password algorithm is independently selected by the target user with the user identifier when submitting the registration request;
[0029] A verification module, configured to generate verification information based on the private key and the cryptographic algorithm, and use the verification information to verify the one-time password to obtain a verification result;
[0030] A return module, configured to return the verification result to the current identity authentication system, so that the current identity authentication system sends the verification result to the client of the target user, and the client displays the verification result.
[0031] Optionally, it further includes:
[0032] A registration module, configured to create the private key in response to the registration request of the target user sent by the current identity authentication system; obtain the user identifier and the cryptographic algorithm from the registration request; store the user identifier, the cryptographic algorithm and the private key; return the private key to the current identity authentication system, so that the current identity authentication system sends the private key to the client of the target user, and the client stores the private key, the user identifier and the cryptographic algorithm.
[0033] Optionally, it further includes:
[0034] A QR code creation module, configured to create QR code information corresponding to the user identifier in response to the registration request; return the QR code information to the current identity authentication system, so that the current identity authentication system sends the QR code information to the client of the target user, and the client displays the QR code information.
[0035] Optionally, it further includes:
[0036] A QR code update module, configured to update the QR code information in response to the QR code update request sent by the current identity authentication system; return the updated QR code information to the current identity authentication system, so that the current identity authentication system sends the updated QR code information to the client of the target user, and the client displays the updated QR code information.
[0037] Optionally, it further includes:
[0038] A user deletion module, configured to delete the private key and the cryptographic algorithm in response to the user deletion request sent by the current identity authentication system; return a notification message indicating success or failure of the deletion to the current identity authentication system, so that the current identity authentication system sends the notification message indicating success or failure of the deletion to the client of the target user, and the client displays the notification message indicating success or failure of the deletion.
[0039] Optionally, different users independently select different cryptographic algorithms when submitting registration requests.
[0040] Optionally, the cryptographic algorithm is: SHA1, SHA256, SHA512 or SM3.
[0041] In a third aspect, the present application provides an electronic device, including:
[0042] A memory for storing a computer program;
[0043] A processor for executing the computer program to implement the identity authentication method disclosed above.
[0044] In a fourth aspect, the present application provides a readable storage medium for saving a computer program, wherein the computer program implements the identity authentication method disclosed above when executed by a processor.
[0045] As can be seen from the above solutions, the present application provides an identity authentication method applied to an OTP microservice. The OTP microservice is docked with at least one identity authentication system, including: receiving a one-time password and a user identifier sent by any identity authentication system; querying the private key and cryptographic algorithm corresponding to the user identifier; the private key is created by the OTP microservice in response to a registration request, and the cryptographic algorithm is independently selected by the target user with the user identifier when submitting a registration request; generating verification information based on the private key and the cryptographic algorithm, and using the verification information to verify the one-time password to obtain a verification result; returning the verification result to the current identity authentication system, so that the current identity authentication system sends the verification result to the client of the target user, and the client displays the verification result.
[0046] It can be seen that the present application provides an OTP microservice that can be docked with at least one identity authentication system, that is, the OTP microservice can serve at least one identity authentication system, so its application universality and versatility are better. Specifically, the OTP microservice can verify the one-time password and user identifier sent by any identity authentication system, and then return the corresponding verification result. Moreover, the OTP microservice supports users to independently select a cryptographic algorithm when submitting a registration request, so different cryptographic algorithms can be used for different users, that is, multiple cryptographic algorithms are supported, thereby improving the security of identity authentication.
[0047] Correspondingly, an identity authentication device, device and readable storage medium provided by the present application also have the above technical effects. Description of the Drawings
[0048] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained according to the provided drawings.
[0049] Figure 1 It is a flowchart of an identity authentication method disclosed in the present application;
[0050] Figure 2 It is a schematic diagram of a client page disclosed in the present application;
[0051] Figure 3 It is a schematic diagram of another identity authentication scheme disclosed in the present application;
[0052] Figure 4 It is a schematic diagram of an identity authentication device disclosed in the present application;
[0053] Figure 5 It is a schematic diagram of an electronic device disclosed in the present application. Specific embodiments
[0054] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope protected by the present application.
[0055] Currently, various commonly used systems require users to register before use, which means that subsequent user logins require identity authentication. That is to say, user identity authentication may occur on various systems, indicating its application necessity and universality. For this reason, the present application provides an identity authentication scheme that can provide a general OTP (One-Time Password) microservice that can be docked with at least one identity authentication system. The OTP microservice can generate a time-related and unpredictable random number combination at regular intervals, and each password can only be used once.
[0056] See Figure 1 As shown, the embodiments of the present application disclose an identity authentication method applied to an OTP microservice. The OTP microservice is docked with at least one identity authentication system, including:
[0057] S101. Receive a one-time password and a user identifier sent by any identity authentication system.
[0058] Among them, the one-time password and the user identifier can be obtained by the current identity authentication system from the login request submitted by the target user. At this time, the one-time password is generated by the client of the target user based on the private key and the cryptographic algorithm. Among them, the input parameter (key type) of the cryptographic algorithm can be selected by the user on the client side. For example, Figure 2 as shown, the user can select the key type: time-based calculation method or counter-based calculation method, and can also supplement the key type independently. In Figure 2 , the user needs to input: account name + key + key type to generate the one-time password.
[0059] Among them, the time-based calculation method is such as TOTP (Time-based One-Time Password algorithm, an algorithm for calculating one-time passwords based on the current time). The counter-based calculation method is such as HOTP (HMAC-based One-Time Password, an algorithm for one-time passwords based on the HMAC algorithm). HMAC (Hash-based Message Authentication Code) is an algorithm for message authentication codes based on keys. Among them, the login request submitted by the target user contains the input parameter selected by the user, and this input parameter will also be sent by the identity authentication system to the OTP microservice, so that the OTP microservice can calculate the verification information in the same way as the client. That is to say, the verification information generated by the OTP microservice is theoretically exactly the same as the one-time password. When the two are exactly the same, it is considered that the authentication is passed; otherwise, the verification fails.
[0060] S102. Query the private key and the cryptographic algorithm corresponding to the user identifier; the private key is created by the OTP microservice in response to the registration request, and the cryptographic algorithm is independently selected by the target user with the user identifier when submitting the registration request.
[0061] In this embodiment, any identity authentication system implements operations such as user registration, login, and logout by calling the OTP microservice. Therefore, the OTP microservice has wide availability. In a specific implementation, the OTP microservice creates a private key in response to the registration request of the target user sent by the current identity authentication system; obtains the user identifier and the cryptographic algorithm from the registration request; stores the user identifier, the cryptographic algorithm, and the private key; and returns the private key to the current identity authentication system, so that the current identity authentication system sends the private key to the client of the target user, and the client stores the private key, the user identifier, and the cryptographic algorithm.
[0062] Among them, the OTP microservice stores the user identifier, the cryptographic algorithm, and the private key of any user in a corresponding manner.
[0063] S103. Generate verification information based on the private key and cryptographic algorithm, and use the verification information to verify the one-time password to obtain a verification result.
[0064] S104. Return the verification result to the current identity authentication system, so that the current identity authentication system sends the verification result to the client of the target user, and the client displays the verification result.
[0065] In this embodiment, each identity authentication system docks with the OTP microservice by calling the standard REST FUL interface of the OTP microservice. The OTP microservice can be developed based on Spring Boot, and the development language can be selected from Java, Python, PHP, etc.
[0066] It should be noted that during the user registration process, the OTP microservice can also generate QR code information representing the user identity information. Therefore, in a specific implementation, it further includes: in response to the registration request, creating QR code information corresponding to the user identifier; returning the QR code information to the current identity authentication system, so that the current identity authentication system sends the QR code information to the client of the target user, and the client displays the QR code information.
[0067] If the QR code information representing the user identity information has a certain expiration period, this QR code information can be updated in real time. Then, in a specific implementation, it further includes: in response to the QR code update request sent by the current identity authentication system, updating the QR code information; returning the updated QR code information to the current identity authentication system, so that the current identity authentication system sends the updated QR code information to the client of the target user, and the client displays the updated QR code information.
[0068] If the QR code information representing the user identity information does not have an expiration period, the original QR code information can be retrieved. In a specific implementation, it further includes: in response to the QR code retrieval request sent by the current identity authentication system, retrieving the QR code information; returning the retrieved QR code information to the current identity authentication system, so that the current identity authentication system sends the QR code information to the client of the target user, and the client displays the QR code information.
[0069] When the user cancels their own account or the identity authentication system actively cancels the account of a certain user, the OTP microservice responds to the user deletion request sent by the current identity authentication system, deletes the private key and cryptographic algorithm; returns a notification message indicating success or failure of the deletion to the current identity authentication system, so that the current identity authentication system sends the notification message indicating success or failure of the deletion to the client of the target user, and the client displays the notification message indicating success or failure of the deletion.
[0070] In a specific embodiment, different users independently select different password algorithms when submitting registration requests. In a specific embodiment, the password algorithms are: SHA1 (Secure Hash Algorithm 1), SHA-2, SHA256 (an algorithm subdivided under SHA-2), SHA512, or SM3 (a password hashing function standard). SHA-2 (Secure Hash Algorithm 2) is a password hashing function algorithm standard.
[0071] It can be seen that the embodiment of the present application provides an OTP microservice that can be docked with at least one identity authentication system, that is, the OTP microservice can serve at least one identity authentication system, so its application universality and generality are better. Specifically, the OTP microservice can verify the one-time password and user identifier sent by any identity authentication system, and then return the corresponding verification result. Moreover, the OTP microservice supports users to independently select password algorithms when submitting registration requests, so different password algorithms can be used for different users, that is, multiple password algorithms are supported, thereby improving the security of identity authentication.
[0072] The following embodiment provides an OTP microservice that supports multiple algorithms such as SHA1, SHA256, SHA512, SM3, SHA-2, etc. The OTP microservice provides a standard REST FUL interface externally, and other systems (such as Figure 3 the third-party WEB application system therein) can call various functions in the OTP microservice through this interface.
[0073] Such as Figure 3 shown, the user of the third-party WEB application system submits a request to the system, and the system realizes corresponding services for the user by calling the OTP microservice.
[0074] Specifically, the OTP microservice in this embodiment mainly includes the following functions.
[0075] (1) After the application system is docked with the OTP microservice, when the application system performs user registration, it passes the user unique identifier and the algorithm it wants to use to the OTP microservice. This microservice creates an authentication private key for the incoming user and returns a bound QR code.
[0076] (2) This microservice provides an interface for re-obtaining the QR code. The application system passes in the user unique identifier, and this microservice searches for its QR code and returns the QR code. If the QR code information representing the user identity information has a certain expiration, the QR code information can be updated immediately, and the QR code information can be updated immediately through the interface for re-obtaining the QR code.
[0077] (3) This microservice provides an interface for deleting a user's private key. When the application system deletes a user, it calls this interface to delete the user's private key.
[0078] (4) This microservice provides an interface for verifying a user's one-time password. When a user logs in, the application system passes the user's unique identifier and the one-time password entered by the user to this microservice. This microservice looks up the private key and the algorithm used based on the user's unique identifier, verifies the incoming one-time password, and returns the verification result to the application system. Generally, this microservice generates a password by itself using the user's private key and the algorithm used. If the newly generated password is exactly the same as the incoming one-time password, it is considered that the incoming one-time password authentication passes; otherwise, it is considered that the incoming one-time password authentication fails.
[0079] It can be seen that the microservice provided in this embodiment can be called by any application system, supports multiple cryptographic algorithms, and enriches the algorithm support for OTP authentication. The OTP microservice provided in the embodiment of this application can be docked with multiple third-party application systems, so its application universality and generality are better. In addition, the OTP microservice also supports users to independently select a cryptographic algorithm when submitting a registration request, so that different cryptographic algorithms can be used for different users, that is, it supports multiple cryptographic algorithms, thereby improving the security of identity authentication.
[0080] Next, an identity authentication device provided in the embodiment of this application will be introduced. The identity authentication device described below can be referred to with the identity authentication method described above.
[0081] See Figure 4 As shown, the embodiment of this application discloses an identity authentication device, which is applied to the OTP microservice. The OTP microservice is docked with at least one identity authentication system, including:
[0082] A receiving module 401, configured to receive a one-time password and a user identifier sent by any identity authentication system;
[0083] A query module 402, configured to query the private key and the cryptographic algorithm corresponding to the user identifier; the private key is created by the OTP microservice in response to a registration request, and the cryptographic algorithm is independently selected by the target user with the user identifier when submitting a registration request;
[0084] A verification module 403, configured to generate verification information based on the private key and the cryptographic algorithm, and verify the one-time password using the verification information to obtain a verification result;
[0085] A return module, configured to return the verification result to the current identity authentication system, so that the current identity authentication system sends the verification result to the client of the target user, and the client displays the verification result.
[0086] In a specific embodiment, it further includes:
[0087] A registration module, configured to create a private key in response to a registration request of a target user sent by the current identity authentication system; obtain a user identifier and a password algorithm from the registration request; store the user identifier, the password algorithm, and the private key; return the private key to the current identity authentication system, so that the current identity authentication system sends the private key to the client of the target user, and the client stores the private key, the user identifier, and the password algorithm.
[0088] In a specific embodiment, it further includes:
[0089] A two-dimensional code creation module, configured to create two-dimensional code information corresponding to a user identifier in response to a registration request; return the two-dimensional code information to the current identity authentication system, so that the current identity authentication system sends the two-dimensional code information to the client of the target user, and the client displays the two-dimensional code information.
[0090] In a specific embodiment, it further includes:
[0091] A two-dimensional code update module, configured to update the two-dimensional code information in response to a two-dimensional code update request sent by the current identity authentication system; return the updated two-dimensional code information to the current identity authentication system, so that the current identity authentication system sends the updated two-dimensional code information to the client of the target user, and the client displays the updated two-dimensional code information.
[0092] In a specific embodiment, it further includes:
[0093] A user deletion module, configured to delete the private key and the password algorithm in response to a user deletion request sent by the current identity authentication system; return a notification message indicating success or failure of the deletion to the current identity authentication system, so that the current identity authentication system sends the notification message indicating success or failure of the deletion to the client of the target user, and the client displays the notification message indicating success or failure of the deletion.
[0094] In a specific embodiment, different users independently select different password algorithms when submitting registration requests.
[0095] In a specific embodiment, the password algorithm is: SHA1, SHA256, SHA512 or SM3.
[0096] Wherein, for the more specific working processes of each module and unit in this embodiment, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated herein.
[0097] It can be seen that this embodiment provides an identity authentication device, providing a general identity authentication solution.
[0098] The following introduces an electronic device provided by an embodiment of the present application. The electronic device described below can be referred to in relation to the identity authentication method and device described above.
[0099] Refer to Figure 5 As shown, an embodiment of the present application discloses an electronic device, including:
[0100] A memory 501 for storing a computer program;
[0101] A processor 502 for executing the computer program to implement the method disclosed in any of the above embodiments.
[0102] In this embodiment, when the processor executes the computer program stored in the memory, the following steps can be specifically implemented: receiving a one-time password and a user identifier sent by any identity authentication system; querying the private key and password algorithm corresponding to the user identifier; the private key is created by the OTP microservice in response to a registration request, and the password algorithm is independently selected by the target user with the user identifier when submitting the registration request; generating verification information based on the private key and password algorithm, and verifying the one-time password using the verification information to obtain a verification result; returning the verification result to the current identity authentication system, so that the current identity authentication system sends the verification result to the client of the target user, and the client displays the verification result.
[0103] In this embodiment, when the processor executes the computer program stored in the memory, the following steps can be specifically implemented: before receiving a one-time password and a user identifier sent by any identity authentication system, creating a private key in response to a registration request of the target user sent by the current identity authentication system; obtaining the user identifier and password algorithm from the registration request; storing the user identifier, password algorithm and private key; returning the private key to the current identity authentication system, so that the current identity authentication system sends the private key to the client of the target user, and the client stores the private key, user identifier and password algorithm.
[0104] In this embodiment, when the processor executes the computer program stored in the memory, the following steps can be specifically implemented: creating two-dimensional code information corresponding to the user identifier in response to a registration request; returning the two-dimensional code information to the current identity authentication system, so that the current identity authentication system sends the two-dimensional code information to the client of the target user, and the client displays the two-dimensional code information.
[0105] In this embodiment, when the processor executes the computer program stored in the memory, the following steps can be specifically implemented: updating the two-dimensional code information in response to a two-dimensional code update request sent by the current identity authentication system; returning the updated two-dimensional code information to the current identity authentication system, so that the current identity authentication system sends the updated two-dimensional code information to the client of the target user, and the client displays the updated two-dimensional code information.
[0106] In this embodiment, when the processor executes the computer program stored in the memory, the following steps can be specifically implemented: in response to a user deletion request sent by the current identity authentication system, delete the private key and the password algorithm; return a notification message indicating success or failure of the deletion to the current identity authentication system, so that the current identity authentication system sends a notification message indicating success or failure of the deletion to the client of the target user, and the client displays the notification message indicating success or failure of the deletion.
[0107] In a specific implementation, different users independently select different password algorithms when submitting a registration request.
[0108] In a specific implementation, the password algorithms are: SHA1, SHA256, SHA512 or SM3.
[0109] Furthermore, an embodiment of the present application further provides a server as the above-mentioned electronic device. The server may specifically include: at least one processor, at least one memory, a power supply, a communication interface, an input / output interface, and a communication bus. Among them, the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the relevant steps in the identity authentication method disclosed in any of the foregoing embodiments.
[0110] In this embodiment, the power supply is used to provide working voltage for each hardware device on the server; the communication interface can create a data transmission channel between the server and external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of the present application, and no specific limitation is imposed on it here; the input / output interface is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application needs, and no specific limitation is made here.
[0111] In addition, as a carrier for storing resources, the memory can be a read-only memory, a random access memory, a disk, or an optical disc, etc., and the resources stored thereon include an operating system, a computer program, and data, etc., and the storage method can be short-term storage or permanent storage.
[0112] Among them, the operating system is used to manage and control each hardware device and the computer program on the server to implement the operation and processing of data in the memory by the processor, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the identity authentication method disclosed in any of the foregoing embodiments, the computer program can further include a computer program that can be used to complete other specific tasks. In addition to data such as virtual machines, the data can also include data such as the developer information of the virtual machines.
[0113] Further, the embodiments of the present application also provide a terminal to serve as the above-mentioned electronic device. The terminal may specifically include, but is not limited to, a smart phone, a tablet computer, a laptop computer, or a desktop computer, etc.
[0114] Generally, the terminal in this embodiment includes: a processor and a memory.
[0115] Among them, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor may also include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.
[0116] The memory may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In this embodiment, the memory is at least used to store the following computer programs. After the computer programs are loaded and executed by the processor, they can implement the relevant steps in the identity authentication method executed by the terminal side disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory may also include an operating system and data, etc., and the storage method may be short-term storage or permanent storage. Among them, the operating system may include Windows, Unix, Linux, etc. The data may include, but is not limited to, update information of application programs.
[0117] In some embodiments, the terminal may further include a display screen, an input / output interface, a communication interface, sensors, a power supply, and a communication bus.
[0118] The following introduces a readable storage medium provided by an embodiment of the present application. The readable storage medium described below can be referred to in mutual reference with the identity authentication method, device, and equipment described above.
[0119] A readable storage medium is used to store a computer program. When the computer program is executed by a processor, the identity authentication method disclosed in the foregoing embodiment is implemented.
[0120] In this embodiment, the computer program executed by the processor may specifically implement the following steps: receiving a one-time password and a user identifier sent by any identity authentication system; querying the private key and password algorithm corresponding to the user identifier; the private key is created by the OTP microservice in response to a registration request, and the password algorithm is independently selected by the target user with the user identifier when submitting the registration request; generating verification information based on the private key and password algorithm, and verifying the one-time password using the verification information to obtain a verification result; returning the verification result to the current identity authentication system, so that the current identity authentication system sends the verification result to the client of the target user, and the client displays the verification result.
[0121] In this embodiment, the computer program executed by the processor may specifically implement the following steps: before receiving the one-time password and the user identifier sent by any identity authentication system, creating a private key in response to the registration request of the target user sent by the current identity authentication system; obtaining the user identifier and password algorithm from the registration request; storing the user identifier, password algorithm, and private key; returning the private key to the current identity authentication system, so that the current identity authentication system sends the private key to the client of the target user, and the client stores the private key, user identifier, and password algorithm.
[0122] In this embodiment, the computer program executed by the processor may specifically implement the following steps: creating two-dimensional code information corresponding to the user identifier in response to the registration request; returning the two-dimensional code information to the current identity authentication system, so that the current identity authentication system sends the two-dimensional code information to the client of the target user, and the client displays the two-dimensional code information.
[0123] In this embodiment, the computer program executed by the processor may specifically implement the following steps: updating the two-dimensional code information in response to the two-dimensional code update request sent by the current identity authentication system; returning the updated two-dimensional code information to the current identity authentication system, so that the current identity authentication system sends the updated two-dimensional code information to the client of the target user, and the client displays the updated two-dimensional code information.
[0124] In this embodiment, the computer program executed by the processor may specifically implement the following steps: in response to a user deletion request sent by the current identity authentication system, delete the private key and the password algorithm; return a notification message indicating success or failure of the deletion to the current identity authentication system, so that the current identity authentication system sends a notification message indicating success or failure of the deletion to the client of the target user, and the client displays the notification message indicating success or failure of the deletion.
[0125] In a specific implementation, different users independently select different password algorithms when submitting a registration request.
[0126] In a specific implementation, the password algorithms are: SHA1, SHA256, SHA512 or SM3.
[0127] The "first", "second", "third", "fourth", etc. (if any) involved in this application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods or devices.
[0128] It should be noted that the descriptions involving "first", "second", etc. in this application are only for descriptive purposes, and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the fact that those skilled in the art can implement it. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0129] Each embodiment in this specification is described in a progressive manner, and the key point of each embodiment is the difference from other embodiments. The same or similar parts between various embodiments can be referred to each other.
[0130] The steps of the methods or algorithms described in combination with the embodiments disclosed in this article can be implemented directly by hardware, software modules executed by a processor, or a combination of both. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of readable storage medium known in the technical field.
[0131] Specific examples are used in this article to elaborate on the principles and implementation manners of this application. The descriptions of the above embodiments are only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. An identity authentication method, characterized in that: Applied to OTP microservices, the OTP microservices are connected to at least one identity authentication system, including: In response to a registration request from a target user sent by the current identity authentication system, a private key is created; Obtaining a user identifier and a password algorithm from the registration request; Storing the user identification, the cryptographic algorithm, and the private key; Returning the private key to the current identity authentication system, so that the current identity authentication system sends the private key to the client of the target user, and the client stores the private key, the user identifier and the cryptographic algorithm; Receiving a one-time password and the user identifier sent by any identity authentication system; the one-time password and the user identifier are obtained by the current identity authentication system from a login request submitted by the target user, and the one-time password is generated by the client of the target user based on the private key and the cryptographic algorithm; Query the private key and the cryptographic algorithm corresponding to the user identifier; the private key is created by the OTP microservice in response to the registration request, and the cryptographic algorithm is independently selected by the target user with the user identifier when submitting the registration request; generating verification information based on the private key and the cryptographic algorithm, and verifying the one-time password using the verification information to obtain a verification result; Return the verification result to the current identity authentication system.
2. The method according to claim 1, characterized in that Also includes: In response to the registration request, creating QR code information corresponding to the user identifier; The QR code information is returned to the current identity authentication system, so that the current identity authentication system sends the QR code information to the client of the target user, and the client displays the QR code information.
3. The method according to claim 2, characterized in that Also includes: In response to a QR code update request sent by the current identity authentication system, updating the QR code information; The updated QR code information is returned to the current identity authentication system, so that the current identity authentication system sends the updated QR code information to the client of the target user, and the client displays the updated QR code information.
4. The method according to claim 1, wherein Also includes: In response to a user deletion request sent by the current identity authentication system, deleting the private key and the cryptographic algorithm; Return a notification message of deletion success or failure to the current identity authentication system, so that the current identity authentication system sends a notification message of deletion success or failure to the client of the target user, and the client displays the notification message of deletion success or failure.
5. The method according to any one of claims 1 to 4, characterized in that Different users can choose different cryptographic algorithms when submitting registration requests.
6. The method according to any one of claims 1 to 4, characterized in that: The cryptographic algorithm is: SHA1, SHA256, SHA512 or SM3.
7. An identity authentication device, characterized in that: Applied to OTP microservices, the OTP microservices are connected to at least one identity authentication system, including: A registration module is configured to create a private key in response to a registration request from a target user sent by a current identity authentication system; obtain a user identifier and a cryptographic algorithm from the registration request; store the user identifier, the cryptographic algorithm, and the private key; and return the private key to the current identity authentication system so that the current identity authentication system sends the private key to a client of the target user, and the client stores the private key, the user identifier, and the cryptographic algorithm. a receiving module, configured to receive a one-time password and the user identifier sent by any identity authentication system; the one-time password and the user identifier are obtained by the current identity authentication system from a login request submitted by the target user, and the one-time password is generated by the client of the target user based on the private key and the cryptographic algorithm; A query module, configured to query the private key and the cryptographic algorithm corresponding to the user identifier; the private key is created by the OTP microservice in response to a registration request, and the cryptographic algorithm is independently selected by the target user with the user identifier when submitting a registration request; a verification module, configured to generate verification information based on the private key and the cryptographic algorithm, and verify the one-time password using the verification information to obtain a verification result; The return module is used to return the verification result to the current identity authentication system, so that the current identity authentication system sends the verification result to the client of the target user, and the client displays the verification result.
8. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the method according to any one of claims 1 to 6.
9. A readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Authentication method and system based on micro-service architecture and computing equipment
CN111711610A
Identity verification method and device
CN112788036A