Login method, device, storage medium and electronic device of invoicing system
By registering on the authorization authentication system to generate an authorization code and using the token to log in to the invoicing system, the problem of information leakage and high development costs between the invoicing system and the third-party system is solved, and security and login efficiency are improved.
Patent Information
- Application Number
- CN202011582814.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-28
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2040-12-28
AI Technical Summary
The single sign-on method between the existing invoicing system and the third-party system has the risk of information leakage, reduces security, and has high development costs and requires a lot of tax knowledge.
Generate authorization codes by registering a third-party system on the authorization and authentication system, generate authorization request information, obtain an authorization token after verification by the authorization and authentication system, and use the token to log in to the invoicing system to avoid account login between the third-party system and the invoicing system. System interoperability.
It improves the security of third-party systems and invoicing systems, simplifies login operations, reduces development costs and user login complexity, and improves login efficiency.
Smart Images

Figure CN114697056B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of electronic information technology, and in particular, to a login method, device, storage medium and electronic device for an invoicing system. Background Art
[0002] With the continuous development of electronic information technology, invoicing systems have been widely used in the tax field. Due to the important role of invoices in social and economic activities, all business fields have the need to use invoicing systems. However, the business involved in the invoicing system is relatively complex and professional. The development of a new invoicing system alone requires a lot of tax knowledge and the development cost is high. Therefore, third-party systems (such as shopping software, sales software, etc.) usually use existing invoicing systems to complete related business. Usually, the third-party system will use SSO (English: Single Sign On, Chinese: Single Sign-On) to authorize login to the invoicing system, which means that the account login system between the third-party system and the invoicing system needs to be interconnected, which may lead to the leakage of information on both sides and reduce security. Summary of the invention
[0003] In order to solve the problems existing in the prior art, the purpose of the present disclosure is to provide a login method, device, storage medium and electronic device for an invoicing system.
[0004] In order to achieve the above-mentioned purpose, according to a first aspect of an embodiment of the present disclosure, a method for logging into an invoicing system is provided, which is applied to a third-party system, and the method includes:
[0005] Generate authorization request information according to the system identification and authorization code of the third-party system, where the authorization code is sent to the third-party system by the authorization authentication system after the third-party system is pre-registered on the authorization authentication system;
[0006] Sending the authorization request information to the authorization authentication system so that the authorization authentication system verifies whether the authorization request information is valid, and sending an authorization token to the third-party system if the authorization request information is valid;
[0007] Receive the authorization token, and send the specified business information and the authorization token to the invoicing system, so that the invoicing system sends the authorization token to the authorization authentication system, and the authorization authentication system is used to verify whether the authorization token is valid and send the verification result to the invoicing system;
[0008] An operation page indicated by the business information sent by the invoicing system is received and displayed to log in to the invoicing system, wherein the operation page is sent by the invoicing system when the verification result indicates that the authorization token is valid.
[0009] Optionally, sending the authorization request information to the authorization authentication system includes:
[0010] Encrypting the authorization request information according to a designated private key, where the designated private key is sent by the authorization authentication system to the third-party system after the third-party system is pre-registered on the authorization authentication system;
[0011] The encrypted authorization request information is sent to the authorization authentication system according to a preset transmission method, and the transmission method includes: a preset transmission protocol and / or a preset signature algorithm.
[0012] Optionally, the method further comprises:
[0013] Sending registration information to the authorization authentication system so that the authorization authentication system registers the third-party system according to the registration information and generates the authorization code according to the registration information, wherein the registration information includes the system identifier, the first billing information of the third-party system, and the second billing information of the user of the third-party system; receiving the authorization code sent by the authorization authentication system; and / or,
[0014] The activation request information is sent to the authorization and authentication system, so that the authorization and authentication system determines that the third-party system is in an activated state according to the system identifier included in the activation request information.
[0015] According to a second aspect of an embodiment of the present disclosure, a method for logging into an invoicing system is provided, which is applied to an authorization and authentication system, and the method includes:
[0016] Receiving authorization request information sent by a third-party system, where the authorization request information is generated by the third-party system according to the system identifier and authorization code of the third-party system, and the authorization code is sent by the authorization authentication system to the third-party system after the third-party system is pre-registered on the authorization authentication system;
[0017] Verify whether the authorization request information is valid, and if the authorization request information is valid, send an authorization token to the third-party system, so that the third-party system sends the specified business information and the authorization token to the invoicing system, and the invoicing system is used to send the authorization token to the authorization authentication system;
[0018] Receive and verify whether the authorization token sent by the invoicing system is valid, and send the verification result to the invoicing system, so that when the verification result indicates that the authorization token is valid, the invoicing system sends the operation page indicated by the business information to the third-party system, and the third-party system is used to receive and display the operation page to log in to the invoicing system.
[0019] Optionally, the verifying whether the authorization request information is valid includes:
[0020] If the authorization request information meets the preset conditions, determining that the authorization request information is valid;
[0021] The preset conditions include one or more of the following:
[0022] The authorization code is valid;
[0023] The system identification and the authorization code match;
[0024] The third-party system indicated by the system identifier is in an activated state;
[0025] The receiving and verifying whether the authorization token sent by the invoicing system is valid includes:
[0026] If the current time is within the valid time range of the authorization token and the authorization token has not been verified before the current time, it is determined that the authorization token is valid;
[0027] If the current time is outside the valid time range, or the authorization token has been verified before the current time, it is determined that the authorization token is invalid.
[0028] Optionally, the method further comprises:
[0029] receiving registration information sent by the third-party system, the registration information including the system identifier, the first billing information of the third-party system, and the second billing information of the user of the third-party system; registering the third-party system according to the registration information, and generating the authorization code according to the registration information; sending the authorization code to the third-party system; and / or,
[0030] Receive activation request information sent by the third-party system, and determine, based on the system identifier included in the activation request information, that the third-party system is in an activated state.
[0031] According to a third aspect of an embodiment of the present disclosure, a login device for an invoicing system is provided, which is applied to a third-party system, and the device includes:
[0032] A generating module, used to generate authorization request information according to the system identification and authorization code of the third-party system, wherein the authorization code is sent to the third-party system by the authorization authentication system after the third-party system is pre-registered on the authorization authentication system;
[0033] A sending module, used for sending the authorization request information to the authorization authentication system, so that the authorization authentication system verifies whether the authorization request information is valid, and sends an authorization token to the third-party system if the authorization request information is valid;
[0034] A receiving module, used for receiving the authorization token, and sending the specified business information and the authorization token to the invoicing system, so that the invoicing system sends the authorization token to the authorization authentication system, and the authorization authentication system is used for verifying whether the authorization token is valid and sending the verification result to the invoicing system;
[0035] A login module is used to receive and display the operation page indicated by the business information sent by the invoicing system to log in to the invoicing system. The operation page is sent by the invoicing system when the verification result indicates that the authorization token is valid.
[0036] Optionally, the sending module is used to:
[0037] Encrypting the authorization request information according to a designated private key, where the designated private key is sent by the authorization authentication system to the third-party system after the third-party system is pre-registered on the authorization authentication system;
[0038] The encrypted authorization request information is sent to the authorization authentication system according to a preset transmission method, and the transmission method includes: a preset transmission protocol and / or a preset signature algorithm.
[0039] Optionally, the sending module is further used for:
[0040] Sending registration information to the authorization authentication system so that the authorization authentication system registers the third-party system according to the registration information and generates the authorization code according to the registration information, wherein the registration information includes the system identifier, the first billing information of the third-party system, and the second billing information of the user of the third-party system; receiving the authorization code sent by the authorization authentication system; and / or,
[0041] The activation request information is sent to the authorization and authentication system, so that the authorization and authentication system determines that the third-party system is in an activated state according to the system identifier included in the activation request information.
[0042] According to a fourth aspect of an embodiment of the present disclosure, a login device for an invoicing system is provided, which is applied to an authorization and authentication system, and the device includes:
[0043] A receiving module, used to receive authorization request information sent by a third-party system, wherein the authorization request information is generated by the third-party system according to the system identification and authorization code of the third-party system, and the authorization code is sent by the authorization authentication system to the third-party system after the third-party system is pre-registered on the authorization authentication system;
[0044] A first processing module is used to verify whether the authorization request information is valid, and if the authorization request information is valid, send an authorization token to the third-party system, so that the third-party system sends the specified business information and the authorization token to the invoicing system, and the invoicing system is used to send the authorization token to the authorization authentication system;
[0045] The second processing module is used to receive and verify whether the authorization token sent by the invoicing system is valid, and send the verification result to the invoicing system, so that when the verification result indicates that the authorization token is valid, the invoicing system sends the operation page indicated by the business information to the third-party system, and the third-party system is used to receive and display the operation page to log in to the invoicing system.
[0046] Optionally, the first processing module is used to: if the authorization request information meets a preset condition, determine that the authorization request information is valid;
[0047] The preset conditions include one or more of the following:
[0048] The authorization code is valid;
[0049] The system identification and the authorization code match;
[0050] The third-party system indicated by the system identifier is in an activated state;
[0051] The second processing module is used to: if the current moment is within the valid time range of the authorization token and the authorization token has not been verified before the current moment, determine that the authorization token is valid; if the current moment is outside the valid time range, or the authorization token has been verified before the current moment, determine that the authorization token is invalid.
[0052] Optionally, the receiving module is further used for:
[0053] receiving registration information sent by the third-party system, the registration information including the system identifier, the first billing information of the third-party system, and the second billing information of the user of the third-party system; registering the third-party system according to the registration information, and generating the authorization code according to the registration information; sending the authorization code to the third-party system; and / or,
[0054] Receive activation request information sent by the third-party system, and determine, based on the system identifier included in the activation request information, that the third-party system is in an activated state.
[0055] According to a fifth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in the first aspect of the embodiment of the present disclosure are implemented.
[0056] According to a sixth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0057] a memory having a computer program stored thereon;
[0058] A processor is used to execute the computer program in the memory to implement the steps of the method described in the first aspect of the embodiment of the present disclosure.
[0059] According to a seventh aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in the second aspect of the embodiment of the present disclosure are implemented.
[0060] According to an eighth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0061] a memory having a computer program stored thereon;
[0062] A processor is used to execute the computer program in the memory to implement the steps of the method described in the second aspect of the embodiment of the present disclosure.
[0063] Through the above technical solution, the third-party system in the present disclosure first generates authorization request information according to the system identification and the authorization code, wherein the authorization code is sent by the authorization authentication system after the third-party system is registered on the authorization authentication system. After that, the third-party system sends the authorization request information to the authorization authentication system. The authorization authentication system verifies the authorization request information and sends the authorization token to the third-party system if the authorization request information is valid. The third-party system then sends the authorization token and the specified business information to the invoicing system. The invoicing system sends the authorization token to the authorization authentication system, and the authorization authentication system verifies the authorization token. If the authorization token is valid, the invoicing system sends the operation page indicated by the business information to the third-party system. Finally, the third-party system receives and displays the operation page to log in to the invoicing system. In the present disclosure, the third-party system obtains the authorization token sent by the authorization authentication system through the authorization code obtained in advance when registering with the authorization authentication system, and then uses the authorization token to log in to the invoicing system. The account login system between the third-party system and the invoicing system does not need to be interconnected, which improves the security of the third-party system and the invoicing system. At the same time, it does not require the user to log in twice, simplifies the login operation, and improves the login efficiency.
[0064] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:
[0066] Figure 1 is a schematic diagram of a login system according to an exemplary embodiment;
[0067] Figure 2 is a flow chart showing a method for logging into an invoicing system according to an exemplary embodiment;
[0068] Figure 3 is a flow chart showing another method for logging into a ticketing system according to an exemplary embodiment;
[0069] Figure 4 is a flow chart showing another method for logging into a ticketing system according to an exemplary embodiment;
[0070] Figure 5 is a flow chart showing a method for logging into an invoicing system according to an exemplary embodiment;
[0071] Figure 6 is a flow chart showing another method for logging into a ticketing system according to an exemplary embodiment;
[0072] Figure 7 is a block diagram of a login device for an invoicing system according to an exemplary embodiment;
[0073] Figure 8 is a block diagram of a login device for an invoicing system according to an exemplary embodiment;
[0074] Fig. 9 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0075] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0076] Before introducing the login method, device, storage medium and electronic device of the invoicing system provided by the present disclosure, the application scenarios involved in each embodiment of the present disclosure are first introduced. The application scenario can be a login system, such as Figure 1As shown, it includes: a third-party system, an invoicing system and an authorization and authentication system, wherein the third-party system can be understood as a system such as shopping software and sales software that needs to use the services provided by the invoicing system, and the third-party system can be a WEB-type software or a PC-type software, and the present disclosure does not make specific restrictions on this. The invoicing system can be understood as any existing invoicing system, which can provide related services of electronic invoices, such as: issuing electronic invoices, printing electronic invoices, canceling red invoices, canceling electronic invoices, electronic invoice inquiries, tax control information inquiries, equipment management, customer information management, commodity information management, inventory inquiries, ticket source management, etc. The authorization and authentication system can be understood as a CA (English: Certification Authority, Chinese: Certification Authority) that is trusted by both the third-party system and the invoicing system. Among them, the third-party system, the invoicing system and the authorization and authentication system can communicate data through any of the protocols in 5G (English: the 5th Generation mobile communication technology, Chinese: the fifth generation mobile communication technology), 4G (English: the 4th Generation mobile communication technology, Chinese: the fourth generation mobile communication technology), and WLAN (English: Wireless Local Area Networks, Chinese: Wireless Local Area Networks). Furthermore, data transmission between the third-party system, the invoicing system and the authorization and authentication system can be carried out according to HTTPS (English: Hyper Text Transfer Protocol over Secure Socket Layer, Chinese: Hypertext Transfer Protocol Security) to ensure the security of data transmission.
[0077] Figure 2 is a flow chart showing a method for logging into a ticketing system according to an exemplary embodiment. Figure 2 As shown, the method is applied to a third-party system and includes the following steps:
[0078] Step 101, generating authorization request information according to the system identification and authorization code of the third-party system, where the authorization code is sent to the third-party system by the authorization authentication system after the third-party system is pre-registered on the authorization authentication system.
[0079] For example, when a user is using a third-party system, if he needs to use the services provided by the invoicing system, he can log in to the invoicing system through the third-party system. The third-party system can first send an inquiry message to ask the user whether to authorize the third-party system to log in to the invoicing system. After the user confirms the inquiry message, the authorization request information can be generated based on the system identifier and authorization code of the third-party system. Among them, the system identifier can uniquely identify the third-party system and can be understood as the system ID. The authorization code can be sent to the third-party system by the authorization authentication system after the third-party system is pre-registered on the authorization authentication system. The authorization code can be understood as ClientKey, which is a key assigned to the third-party system by the authorization authentication system. Different third-party systems correspond to different authorization codes, that is, the authorization authentication system can uniquely determine the identity of the third-party system based on the authorization code.
[0080] Step 102: Send the authorization request information to the authorization authentication system so that the authorization authentication system verifies whether the authorization request information is valid, and sends an authorization token to the third-party system if the authorization request information is valid.
[0081] For example, the third-party system sends the authorization request information to the authorization authentication system, and the authorization authentication system verifies the authorization request information. If the authorization authentication system determines that the authorization request information is valid, then it can generate an authorization token (i.e., Token) according to the preset rules, and send the authorization token to the third-party system. If the authorization authentication system determines that the authorization request information is invalid, then it can ignore the authorization request information, or return a first prompt message to the third-party system to prompt the user that the third-party system cannot log in to the invoicing system. It should be noted that the way the authorization authentication system verifies the authorization request information may include verifying whether the authorization code is valid, verifying whether the system identifier and the authorization code match, and verifying whether the third-party system indicated by the system identifier is in an activated state (the activated state is used to indicate that the third-party system can use the services provided by the invoicing system). Accordingly, the validity of the authorization request information can be understood as the authorization authentication system confirming that the authorization code is valid, the system identifier and the authorization code match, and the third-party system indicated by the system identifier is in an activated state.
[0082] Step 103, receiving the authorization token, and sending the specified business information and the authorization token to the invoicing system, so that the invoicing system sends the authorization token to the authorization authentication system, the authorization authentication system is used to verify whether the authorization token is valid, and send the verification result to the invoicing system.
[0083] Step 104, receiving and displaying an operation page indicated by the business information sent by the invoicing system to log in to the invoicing system. The operation page is sent by the invoicing system when the verification result indicates that the authorization token is valid.
[0084] For example, after receiving the authorization token, the third-party system can send the specified business information and the authorization token to the invoicing system. Among them, the business information can be understood as information that can reflect which business the user needs to use, for example, it can be: issuing electronic invoices, printing electronic invoices, canceling, canceling electronic invoices, electronic invoice query, tax control information query, equipment management, customer information management, commodity information management, inventory query, ticket source management, etc. Further, the invoicing system can forward the authorization token to the authorization authentication system so that the authorization authentication system verifies the authorization token. The authorization authentication system will feed back the verification result of the authorization token to the invoicing system to inform the invoicing system whether the authorization token is valid. Accordingly, when the invoicing system determines that the verification result indicates that the authorization token is valid, the operation page indicated by the business information will be sent to the third-party system. If the invoicing system determines that the verification result indicates that the authorization token is invalid, the third-party system can be rejected. The operation page can be understood as a page that can execute business information. For example, if the business information is issuing electronic invoices, then the operation page can be an invoicing page. For another example, if the business information is electronic invoice query, then the operation page can be a query page. Finally, the third-party system can receive and display the operation page. That is to say, at this time, the user logs in to the invoicing system through the third-party system and can perform corresponding operations on the operation page.
[0085] In this way, the third-party system and the invoicing system, with the help of the authorization and authentication system trusted by both parties, realize the third-party system to log in to the invoicing system through the authorization token provided by the authorization and authentication system, which does not require the intercommunication of the account login system between the third-party system and the invoicing system, thus improving the security of the third-party system and the invoicing system, and at the same time, reducing the coupling degree between the third-party system and the invoicing system and improving compatibility. In addition, the user does not need to log in twice, which simplifies the login operation and improves the login efficiency.
[0086] Figure 3 is a flow chart showing another method for logging into a ticketing system according to an exemplary embodiment. Figure 3 As shown, step 102 may include:
[0087] Step 1021, encrypt the authorization request information according to the designated private key, where the designated private key is pre-registered on the authorization authentication system by the third-party system and sent by the authorization authentication system to the third-party system.
[0088] Step 1022, the encrypted authorization request information is sent to the authorization authentication system according to a preset transmission method, and the transmission method includes: a preset transmission protocol and / or a preset signature algorithm.
[0089] For example, after a third-party system is registered on the authorization authentication system, the authorization authentication system can send a specified private key in addition to the authorization code to the third-party system. Before the third-party system sends the authorization request information, it can use the specified private key to encrypt the authorization request information, thereby improving the security of the authorization code. For example, after the authorization authentication system registers the third-party system, it can generate a key pair for the third-party system, which includes a specified private key and a specified public key corresponding to the specified private key. Then, a CA certificate can be generated based on the specified private key and the specified public key and sent to the third-party system.
[0090] The third-party system can first encrypt the authorization request information according to the specified private key, and then send the encrypted authorization request information to the authorization authentication system according to the preset transmission method, wherein the transmission method may include: a preset transmission protocol, and / or a preset signature algorithm, the transmission protocol may be, for example, HTTPS, and the signature algorithm may be HMAC (English: Hash-based Message Authentication Code, Chinese: Hash Message Authentication Code) 256 algorithm. Correspondingly, the authorization authentication system will receive the encrypted authorization request information according to the transmission protocol, and verify whether the encrypted authorization request information has been tampered with according to the signature algorithm. After determining that the encrypted authorization request information has not been tampered with, the encrypted authorization request information can be decrypted using the specified public key corresponding to the specified private key to obtain the authorization request information.
[0091] Figure 4 is a flow chart showing another method for logging into a ticketing system according to an exemplary embodiment. Figure 4 As shown, the method may also include the following steps:
[0092] Step 105: Send the registration information to the authorization authentication system so that the authorization authentication system registers the third-party system according to the registration information and generates an authorization code according to the registration information. The registration information includes the system identifier, the first billing information of the third-party system, and the second billing information of the user of the third-party system. Receive the authorization code sent by the authorization authentication system. And / or,
[0093] Step 106: Send the activation request information to the authorization and authentication system, so that the authorization and authentication system determines that the third-party system is in an activated state according to the system identifier included in the activation request information.
[0094] For example, before logging into the invoicing system, the third-party system may first send registration information to the authorization and authentication system. The authorization and authentication system registers the third-party system based on the registration information and generates an authorization code. The registration information may include a system identifier, first invoicing information of the third-party system, and second invoicing information of the user of the third-party system. Taking the third-party system as a shopping software as an example, the first invoicing information may include the software identifier of the shopping software, the tax number, title, legal person, and industrial and commercial certificate of the software development company, and the second invoicing information may include the tax number, title, identity certificate, and industrial and commercial certificate of the user who uses the shopping software. Furthermore, while sending the authorization code to the third-party system, the authorization and authentication system may also send a second prompt message to prompt the user that the third-party system has been successfully registered.
[0095] Before logging into the invoicing system, the third-party system may also send an activation request message to the authorization and authentication system. The activation request message may include a system identifier and a payment voucher. The authorization and authentication system may determine that the third-party system is in an activated state based on the system identifier and payment voucher included in the activation request message. The activated state can indicate that the third-party system can use the services provided by the invoicing system. Furthermore, the authorization and authentication system may also send a third prompt message to prompt the user that the third-party system has been successfully activated.
[0096] In one implementation, the invoicing system may be a web invoicing system. Accordingly, sending the specified business information and the authorization token to the invoicing system in step 103 may be implemented in the following manner:
[0097] First, the business information and authorization token can be encapsulated into address information in a specified format, where the specified format can be, for example, a URL (Uniform Resource Locator) format. After that, the address information is sent to the invoicing system in the form of an HTTPS+GET request. In this way, after receiving the operation page, the third-party system can directly open the operation page without the user performing other operations, thereby simplifying the operation. For example, the address information can be: IP:PORT / login.htm? para=AAA&access_token=BBB, where AAA is the business information and BBB is the authorization token. Sending the address information in the form of an HTTPS+GET request means accessing: https: / / IP:PORT / login.htm? para=AAA&access_token=BBB.
[0098] In summary, in the present disclosure, the third-party system first generates authorization request information according to the system identifier and the authorization code, wherein the authorization code is sent by the authorization authentication system after the third-party system is registered on the authorization authentication system. After that, the third-party system sends the authorization request information to the authorization authentication system. The authorization authentication system verifies the authorization request information and sends the authorization token to the third-party system if the authorization request information is valid. The third-party system then sends the authorization token and the specified business information to the invoicing system. The invoicing system sends the authorization token to the authorization authentication system, and the authorization authentication system verifies the authorization token. If the authorization token is valid, the invoicing system sends the operation page indicated by the business information to the third-party system. Finally, the third-party system receives and displays the operation page to log in to the invoicing system. In the present disclosure, the third-party system obtains the authorization token sent by the authorization authentication system through the authorization code obtained in advance when registering with the authorization authentication system, and then uses the authorization token to log in to the invoicing system. The account login system between the third-party system and the invoicing system does not need to be interconnected, which improves the security of the third-party system and the invoicing system. At the same time, it does not require the user to log in twice, which simplifies the login operation and improves the login efficiency.
[0099] Figure 5 is a flow chart showing a method for logging into a ticketing system according to an exemplary embodiment. Figure 5 As shown, the method is applied to the authorization and authentication system, comprising the following steps:
[0100] Step 201, receiving authorization request information sent by a third-party system. The authorization request information is generated by the third-party system according to the system identification and authorization code of the third-party system. The authorization code is sent to the third-party system by the authorization authentication system after the third-party system is pre-registered on the authorization authentication system.
[0101] For example, when a user is using a third-party system, if he needs to use the services provided by the invoicing system, he can log in to the invoicing system through the third-party system. The third-party system can generate authorization request information based on the system identifier and authorization code of the third-party system, and send it to the authorization authentication system. Among them, the system identifier can uniquely identify the third-party system and can be understood as the system ID. The authorization code can be sent to the third-party system by the authorization authentication system after the third-party system is pre-registered on the authorization authentication system. The authorization code can be understood as ClientKey, which is a key assigned to the third-party system by the authorization authentication system. Different third-party systems correspond to different authorization codes, that is, the authorization authentication system can uniquely determine the identity of the third-party system based on the authorization code.
[0102] Step 202, verify whether the authorization request information is valid, and send an authorization token to the third-party system if the authorization request information is valid, so that the third-party system sends the specified business information and the authorization token to the invoicing system, and the invoicing system is used to send the authorization token to the authorization authentication system.
[0103] Step 203, receiving and verifying whether the authorization token sent by the invoicing system is valid, and sending the verification result to the invoicing system, so that when the verification result indicates that the authorization token is valid, the invoicing system sends the operation page indicated by the business information to the third-party system, and the third-party system is used to receive and display the operation page to log in to the invoicing system.
[0104] For example, the authorization authentication system verifies the authorization request information. If the authorization authentication system determines that the authorization request information is valid, it can generate an authorization token (i.e., Token) according to preset rules and send the authorization token to the third-party system. If the authorization authentication system determines that the authorization request information is invalid, it can ignore the authorization request information or return the first prompt information to the third-party system to prompt the user that the third-party system cannot log in to the invoicing system.
[0105] After receiving the authorization token, the third-party system can send the specified business information together with the authorization token to the invoicing system. Among them, business information can be understood as information that can reflect which services the user needs to use. Furthermore, the invoicing system can forward the authorization token to the authorization authentication system so that the authorization authentication system can verify the authorization token. The authorization authentication system will feed back the verification result of the authorization token to the invoicing system to inform the invoicing system whether the authorization token is valid. Accordingly, when the invoicing system determines that the verification result indicates that the authorization token is valid, the operation page indicated by the business information will be sent to the third-party system. The operation page can be understood as a page that can execute business information. For example, if the business information is to issue an electronic invoice, then the operation page can be an invoicing page. Finally, the third-party system can receive and display the operation page, which means that at this time the user has logged in to the invoicing system through the third-party system and can perform corresponding operations on the operation page.
[0106] In this way, the third-party system and the invoicing system, with the help of the authorization and authentication system trusted by both parties, realize the third-party system to log in to the invoicing system through the authorization token provided by the authorization and authentication system, which does not require the intercommunication of the account login system between the third-party system and the invoicing system, thus improving the security of the third-party system and the invoicing system, and at the same time, reducing the coupling degree between the third-party system and the invoicing system and improving compatibility. In addition, the user does not need to log in twice, which simplifies the login operation and improves the login efficiency.
[0107] In one implementation, the method of verifying whether the authorization request information is valid in step 202 may be:
[0108] If the authorization request information meets the preset conditions, it is determined that the authorization request information is valid.
[0109] The preset conditions include one or more of the following: Condition 1: the authorization code is valid. Condition 2: the system identifier and the authorization code match. Condition 3: the third-party system indicated by the system identifier is in an activated state.
[0110] For example, the way in which the authorization authentication system verifies the authorization request information may include verifying whether the authorization code is valid, verifying whether the system identifier and the authorization code match, and verifying whether the third-party system indicated by the system identifier is in an activated state (the activated state is used to indicate that the third-party system can use the services provided by the invoicing system). Accordingly, the authorization request information is valid, and it can be understood that the authorization request information at least meets one or more of conditions 1 to 3. For example, if the authorization code is valid, the system identifier and the authorization code match, and the third-party system indicated by the system identifier is in an activated state, then it can be confirmed that the authorization request information is valid.
[0111] In step 203, the method for verifying whether the authorization token sent by the invoicing system is valid may be:
[0112] If the current time is within the valid time range of the authorization token, and the authorization token has not been verified before the current time, the authorization token is determined to be valid. If the current time is outside the valid time range, or the authorization token has been verified before the current time, the authorization token is determined to be invalid.
[0113] For example, when the authorization authentication system generates an authorization token, it can set a valid time range (for example, 24 hours) for the authorization token. In this way, after receiving the authorization token sent by the invoicing system, the authorization authentication system can first verify whether the authorization token is the same as the one previously sent to the third-party system, that is, first verify whether the authorization token is legal, and then verify whether the authorization token exceeds the valid time range, that is, determine whether the moment of receiving the authorization token is within the valid time range. Furthermore, in order to ensure the security of the authorization token, the number of times the authorization token is used can be limited, for example, the authorization token can only be used once.
[0114] Correspondingly, the method for verifying whether the authorization token is valid can be: first verify whether the authorization token is legal. If the authorization token is legal, then further determine the valid time range and the number of uses. If the authorization token is invalid, determine that the authorization token is invalid. If the current moment is within the valid time range of the authorization token, and the authorization token has not been verified before the current moment (that is, the authorization token is used for the first time), the authorization token is determined to be valid. If the current moment is outside the valid time range, or the authorization token has been verified before the current moment (that is, the authorization token is not used for the first time), the authorization token is determined to be invalid. Furthermore, after determining that the authorization token is invalid, the authorization authentication system can also send a fourth prompt message to the invoicing system or the third-party system to prompt the user that the authorization token is invalid.
[0115] Figure 6 is a flow chart showing another method for logging into a ticketing system according to an exemplary embodiment. Figure 6 As shown, the method may also include:
[0116] Step 204: Receive registration information sent by the third-party system, the registration information including the system identifier, the first billing information of the third-party system, and the second billing information of the user of the third-party system. Register the third-party system according to the registration information, and generate an authorization code according to the registration information. Send the authorization code to the third-party system. And / or,
[0117] Step 205: receiving activation request information sent by the third-party system, and determining that the third-party system is in an activated state according to the system identifier included in the activation request information.
[0118] For example, before logging into the invoicing system, the third-party system can first send registration information to the authorization and authentication system. The authorization and authentication system can register the third-party system based on the registration information and generate an authorization code. The registration information may include a system identifier, first invoicing information of the third-party system, and second invoicing information of the user of the third-party system. Taking the third-party system as a shopping software as an example, the first invoicing information may include the software identifier of the shopping software, the tax number, title, legal person, and industrial and commercial certificate of the software development company, and the second invoicing information may include the tax number, title, identity certificate, and industrial and commercial certificate of the user using the shopping software. Furthermore, while sending the authorization code to the third-party system, the authorization and authentication system may also send a second prompt message to prompt the user that the third-party system has been successfully registered.
[0119] Before logging into the invoicing system, the third-party system may also send an activation request message to the authorization and authentication system. The activation request message may include a system identifier and a payment voucher. The authorization and authentication system may determine that the third-party system is in an activated state based on the system identifier and payment voucher included in the activation request message. The activated state can indicate that the third-party system can use the services provided by the invoicing system. Furthermore, the authorization and authentication system may also send a third prompt message to prompt the user that the third-party system has been successfully activated.
[0120] In summary, in the present disclosure, the third-party system first generates authorization request information according to the system identifier and the authorization code, wherein the authorization code is sent by the authorization authentication system after the third-party system is registered on the authorization authentication system. After that, the third-party system sends the authorization request information to the authorization authentication system. The authorization authentication system verifies the authorization request information and sends the authorization token to the third-party system if the authorization request information is valid. The third-party system then sends the authorization token and the specified business information to the invoicing system. The invoicing system sends the authorization token to the authorization authentication system, and the authorization authentication system verifies the authorization token. If the authorization token is valid, the invoicing system sends the operation page indicated by the business information to the third-party system. Finally, the third-party system receives and displays the operation page to log in to the invoicing system. In the present disclosure, the third-party system obtains the authorization token sent by the authorization authentication system through the authorization code obtained in advance when registering with the authorization authentication system, and then uses the authorization token to log in to the invoicing system. The account login system between the third-party system and the invoicing system does not need to be interconnected, which improves the security of the third-party system and the invoicing system. At the same time, it does not require the user to log in twice, which simplifies the login operation and improves the login efficiency.
[0121] Figure 7 is a block diagram of a login device for an invoicing system according to an exemplary embodiment. Figure 7 As shown, the device 300 is applied to a third-party system, including:
[0122] The generation module 301 is used to generate authorization request information according to the system identification and authorization code of the third-party system. The authorization code is sent to the third-party system by the authorization authentication system after the third-party system is pre-registered on the authorization authentication system.
[0123] The sending module 302 is used to send the authorization request information to the authorization authentication system, so that the authorization authentication system verifies whether the authorization request information is valid, and sends an authorization token to the third-party system if the authorization request information is valid.
[0124] The receiving module 303 is used to receive the authorization token and send the specified business information and the authorization token to the invoicing system, so that the invoicing system sends the authorization token to the authorization authentication system, which verifies whether the authorization token is valid and sends the verification result to the invoicing system.
[0125] The login module 304 is used to receive and display the operation page indicated by the business information sent by the invoicing system to log in to the invoicing system. The operation page is sent by the invoicing system when the verification result indicates that the authorization token is valid.
[0126] In one application scenario, the sending module 302 may be used to:
[0127] The authorization request information is encrypted according to a designated private key, where the designated private key is pre-registered on the authorization authentication system by the third-party system and then sent to the third-party system by the authorization authentication system.
[0128] The encrypted authorization request information is sent to the authorization authentication system according to a preset transmission method, and the transmission method includes: a preset transmission protocol and / or a preset signature algorithm.
[0129] In another application scenario, the sending module 302 may be used to:
[0130] Send the registration information to the authorization authentication system so that the authorization authentication system registers the third-party system according to the registration information and generates an authorization code according to the registration information. The registration information includes the system identifier, the first billing information of the third-party system, and the second billing information of the user of the third-party system. Receive the authorization code sent by the authorization authentication system. And / or,
[0131] The activation request information is sent to the authorization authentication system, so that the authorization authentication system determines that the third-party system is in an activated state according to the system identifier included in the activation request information.
[0132] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0133] In summary, in the present disclosure, the third-party system first generates authorization request information according to the system identifier and the authorization code, wherein the authorization code is sent by the authorization authentication system after the third-party system is registered on the authorization authentication system. After that, the third-party system sends the authorization request information to the authorization authentication system. The authorization authentication system verifies the authorization request information and sends the authorization token to the third-party system if the authorization request information is valid. The third-party system then sends the authorization token and the specified business information to the invoicing system. The invoicing system sends the authorization token to the authorization authentication system, and the authorization authentication system verifies the authorization token. If the authorization token is valid, the invoicing system sends the operation page indicated by the business information to the third-party system. Finally, the third-party system receives and displays the operation page to log in to the invoicing system. In the present disclosure, the third-party system obtains the authorization token sent by the authorization authentication system through the authorization code obtained in advance when registering with the authorization authentication system, and then uses the authorization token to log in to the invoicing system. The account login system between the third-party system and the invoicing system does not need to be interconnected, which improves the security of the third-party system and the invoicing system. At the same time, it does not require the user to log in twice, which simplifies the login operation and improves the login efficiency.
[0134] Figure 8 is a block diagram of a login device for an invoicing system according to an exemplary embodiment. Figure 8 As shown, the device 400 is applied to an authorization and authentication system, and includes:
[0135] Receiving module 401 is used to receive authorization request information sent by a third-party system. The authorization request information is generated by the third-party system according to the system identifier and authorization code of the third-party system. The authorization code is sent to the third-party system by the authorization authentication system after the third-party system is pre-registered on the authorization authentication system.
[0136] The first processing module 402 is used to verify whether the authorization request information is valid, and if the authorization request information is valid, send an authorization token to the third-party system, so that the third-party system sends the specified business information and authorization token to the invoicing system, and the invoicing system is used to send the authorization token to the authorization authentication system.
[0137] The second processing module 403 is used to receive and verify whether the authorization token sent by the invoicing system is valid, and send the verification result to the invoicing system, so that when the verification result indicates that the authorization token is valid, the invoicing system sends the operation page indicated by the business information to the third-party system, and the third-party system is used to receive and display the operation page to log in to the invoicing system.
[0138] In an application scenario, the first processing module 402 may be used to: if the authorization request information meets a preset condition, determine that the authorization request information is valid.
[0139] The preset conditions include one or more of the following:
[0140] The authorization code is valid.
[0141] The system ID and authorization code match.
[0142] The third-party system indicated by the system identifier is in an activated state.
[0143] The second processing module 403 can be used to: determine that the authorization token is valid if the current time is within the valid time range of the authorization token and the authorization token has not been verified before the current time; and determine that the authorization token is invalid if the current time is outside the valid time range or the authorization token has been verified before the current time.
[0144] In another application scenario, the receiving module 401 is further used for:
[0145] Receive registration information sent by a third-party system, the registration information including system identification, first billing information of the third-party system, and second billing information of a user of the third-party system. Register the third-party system according to the registration information, and generate an authorization code according to the registration information. Send the authorization code to the third-party system. And / or,
[0146] Receive activation request information sent by the third-party system, and determine that the third-party system is in an activated state according to the system identifier included in the activation request information.
[0147] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0148] In summary, in the present disclosure, the third-party system first generates authorization request information according to the system identifier and the authorization code, wherein the authorization code is sent by the authorization authentication system after the third-party system is registered on the authorization authentication system. After that, the third-party system sends the authorization request information to the authorization authentication system. The authorization authentication system verifies the authorization request information and sends the authorization token to the third-party system if the authorization request information is valid. The third-party system then sends the authorization token and the specified business information to the invoicing system. The invoicing system sends the authorization token to the authorization authentication system, and the authorization authentication system verifies the authorization token. If the authorization token is valid, the invoicing system sends the operation page indicated by the business information to the third-party system. Finally, the third-party system receives and displays the operation page to log in to the invoicing system. In the present disclosure, the third-party system obtains the authorization token sent by the authorization authentication system through the authorization code obtained in advance when registering with the authorization authentication system, and then uses the authorization token to log in to the invoicing system. The account login system between the third-party system and the invoicing system does not need to be interconnected, which improves the security of the third-party system and the invoicing system. At the same time, it does not require the user to log in twice, which simplifies the login operation and improves the login efficiency.
[0149] Fig. 9 is a block diagram of an electronic device 500 according to an exemplary embodiment. For example, the electronic device 500 may be provided as a server. Fig. 9 The electronic device 500 includes a processor 522, which may be one or more, and a memory 532 for storing a computer program executable by the processor 522. The computer program stored in the memory 532 may include one or more modules, each corresponding to a set of instructions. In addition, the processor 522 may be configured to execute the computer program to perform any of the above-mentioned methods for logging into the invoicing system.
[0150] In addition, the electronic device 500 may further include a power supply component 526 and a communication component 550. The power supply component 526 may be configured to perform power management of the electronic device 500, and the communication component 550 may be configured to implement communication of the electronic device 500, for example, wired or wireless communication. In addition, the electronic device 500 may further include an input / output (I / O) interface 558. The electronic device 500 may operate based on an operating system stored in the memory 532, such as Windows Server 2008. TM , Mac OSX TM , Unix TM , Linux TM etc.
[0151] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of any of the above-mentioned methods for logging into the invoicing system are implemented. For example, the computer-readable storage medium may be the above-mentioned memory 532 including program instructions, and the above-mentioned program instructions may be executed by the processor 522 of the electronic device 500 to complete any of the above-mentioned methods for logging into the invoicing system.
[0152] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing any of the above-mentioned methods for logging into the invoicing system when executed by the programmable device.
[0153] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.
[0154] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.
[0155] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.
Claims
1. A method for logging into an invoicing system, characterized in that: Applied to a third-party system, the method includes: Generate authorization request information according to the system identification and authorization code of the third-party system, where the authorization code is sent to the third-party system by the authorization authentication system after the third-party system is pre-registered on the authorization authentication system; Sending the authorization request information to the authorization authentication system so that the authorization authentication system verifies whether the authorization request information is valid, and sends an authorization token to the third-party system if the authorization request information is valid; the case where the authorization request information is valid includes: the authorization authentication system confirms that the authorization code is valid, the system identifier matches the authorization code, and the third-party system indicated by the system identifier is in an activated state; Receive the authorization token, and send the specified business information and the authorization token to the invoicing system, so that the invoicing system sends the authorization token to the authorization authentication system, and the authorization authentication system is used to verify whether the authorization token is valid and send the verification result to the invoicing system; An operation page indicated by the business information sent by the invoicing system is received and displayed to log in to the invoicing system, wherein the operation page is sent by the invoicing system when the verification result indicates that the authorization token is valid.
2. The method according to claim 1, characterized in that The sending of the authorization request information to the authorization authentication system includes: Encrypting the authorization request information according to a designated private key, where the designated private key is sent by the authorization authentication system to the third-party system after the third-party system is pre-registered on the authorization authentication system; The encrypted authorization request information is sent to the authorization authentication system according to a preset transmission method, and the transmission method includes: a preset transmission protocol and / or a preset signature algorithm.
3. The method according to claim 1, characterized in that: The method further comprises: Sending registration information to the authorization authentication system so that the authorization authentication system registers the third-party system according to the registration information and generates the authorization code according to the registration information, wherein the registration information includes the system identifier, the first billing information of the third-party system, and the second billing information of the user of the third-party system; receiving the authorization code sent by the authorization authentication system; and / or, The activation request information is sent to the authorization and authentication system, so that the authorization and authentication system determines that the third-party system is in an activated state according to the system identifier included in the activation request information.
4. A method for logging into an invoicing system, characterized in that: Applied to an authorization and authentication system, the method comprises: Receiving authorization request information sent by a third-party system, where the authorization request information is generated by the third-party system according to the system identifier and authorization code of the third-party system, and the authorization code is sent by the authorization authentication system to the third-party system after the third-party system is pre-registered on the authorization authentication system; Verify whether the authorization request information is valid, and if the authorization request information is valid, send an authorization token to the third-party system, so that the third-party system sends the specified business information and the authorization token to the invoicing system, and the invoicing system is used to send the authorization token to the authorization authentication system; receiving and verifying whether the authorization token sent by the invoicing system is valid, and sending the verification result to the invoicing system, so that the invoicing system sends the operation page indicated by the business information to the third-party system when the verification result indicates that the authorization token is valid, and the third-party system is used to receive and display the operation page to log in to the invoicing system; The verifying whether the authorization request information is valid includes: If the authorization request information meets the preset conditions, determining that the authorization request information is valid; The preset conditions include one or more of the following: The authorization code is valid; The system identification and the authorization code match; The third-party system indicated by the system identifier is in an activated state.
5. The method according to claim 4, characterized in that The receiving and verifying whether the authorization token sent by the invoicing system is valid includes: If the current time is within the valid time range of the authorization token and the authorization token has not been verified before the current time, it is determined that the authorization token is valid; If the current time is outside the valid time range, or the authorization token has been verified before the current time, it is determined that the authorization token is invalid.
6. The method according to claim 4, characterized in that The method further comprises: receiving registration information sent by the third-party system, the registration information including the system identifier, the first billing information of the third-party system, and the second billing information of the user of the third-party system; registering the third-party system according to the registration information, and generating the authorization code according to the registration information; sending the authorization code to the third-party system; and / or, Receive activation request information sent by the third-party system, and determine, based on the system identifier included in the activation request information, that the third-party system is in an activated state.
7. A login device for an invoicing system, characterized in that: Applied to a third-party system, the device comprises: A generating module, used to generate authorization request information according to the system identification and authorization code of the third-party system, wherein the authorization code is sent to the third-party system by the authorization authentication system after the third-party system is pre-registered on the authorization authentication system; A sending module, used for sending the authorization request information to the authorization authentication system, so that the authorization authentication system verifies whether the authorization request information is valid, and sends an authorization token to the third-party system if the authorization request information is valid; the case where the authorization request information is valid includes: the authorization authentication system confirms that the authorization code is valid, the system identifier matches the authorization code, and the third-party system indicated by the system identifier is in an activated state; A receiving module, used for receiving the authorization token, and sending the specified business information and the authorization token to the invoicing system, so that the invoicing system sends the authorization token to the authorization authentication system, and the authorization authentication system is used for verifying whether the authorization token is valid and sending the verification result to the invoicing system; A login module is used to receive and display the operation page indicated by the business information sent by the invoicing system to log in to the invoicing system. The operation page is sent by the invoicing system when the verification result indicates that the authorization token is valid.
8. A login device for an invoicing system, characterized in that: Applied to an authorization and authentication system, the device comprises: A receiving module, used to receive authorization request information sent by a third-party system, wherein the authorization request information is generated by the third-party system according to the system identification and authorization code of the third-party system, and the authorization code is sent by the authorization authentication system to the third-party system after the third-party system is pre-registered on the authorization authentication system; A first processing module is used to verify whether the authorization request information is valid, and if the authorization request information is valid, send an authorization token to the third-party system, so that the third-party system sends the specified business information and the authorization token to the invoicing system, and the invoicing system is used to send the authorization token to the authorization authentication system; The second processing module is used to receive and verify whether the authorization token sent by the invoicing system is valid, and send the verification result to the invoicing system, so that the invoicing system sends the operation page indicated by the business information to the third-party system when the verification result indicates that the authorization token is valid, and the third-party system is used to receive and display the operation page to log in to the invoicing system; The verifying whether the authorization request information is valid includes: If the authorization request information meets the preset conditions, determining that the authorization request information is valid; The preset conditions include one or more of the following: The authorization code is valid; The system identification and the authorization code match; The third-party system indicated by the system identifier is in an activated state.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 3 or claims 4 to 6 are implemented.
10. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 3 or claims 4 to 6.
