Authorization verification system and method
By generating an authorization code that carries valid time and interface permissions, the resource permission verification in OAuth 2.0 technology is simplified, and the R&D resource consumption and cost of high R&D resources caused by OAuth 2.0 technology setting up an authorization layer between third parties and service providers is solved. The problem is to achieve efficient management and authority control of resources.
Patent Information
- Application Number
- CN202010711231.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-22
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2040-07-22
AI Technical Summary
The existing OAuth 2.0 technology has set up an authorization layer between third parties and service providers, which leads to high consumption of R&D resources and high cost, making it difficult to implement quickly. It is especially suitable for platforms with few R&D resources and high timeliness requirements.
The resource-owned object management module generates the first authorization code, carries the effective time of the resource-owned object, and the resource-owned object, carries the effective time of the resource and the interface permissions. The permission verification module obtains and verifies the interface call request and verifies the Both, if passed, the interface call will be run to achieve resource permission control.
Resource permission management is simplified, and the timeliness and interface permission management of the objects and specific resources belonging to the resource are realized through two sets of authorization codes, reducing R&D costs and resource consumption, and improving efficiency.
Smart Images

Figure CN111832055B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and more particularly to a permission verification system, a permission verification method, a computing device, and a computer-readable storage medium. Background Art
[0002] With the rapid development of computer technology, more and more resources are stored on computers. Users can call resources stored on computers according to their needs, thus OAuth (Open Authorization) technology was born. OAuth is an open standard that allows resource owners to allow third parties to access private resources stored on a website.
[0003] OAuth 2.0 technology is that OAuth sets up an authorization layer between the third party and the service provider. The resource owner stores the resources in the service provider and provides a token to the third party, specifying the scope of authority and validity period of the token. The token is different from the resource owner's account and password. The third party does not need to log in to the service provider with the resource owner's account and password, but logs in to the authorization layer with the token, thereby separating the resource owner from the third party and ensuring the security of the resource owner's account.
[0004] However, although the above solution has been widely used, it requires setting up an authorization layer between the third party and the service provider and providing a token to the third party. The solution is relatively complicated, resulting in more R&D resources and higher R&D costs. For platforms with fewer R&D resources and high timeliness requirements, it is difficult to quickly develop and implement it. Summary of the invention
[0005] In view of this, the embodiments of this specification provide a permission verification system. This specification also relates to a permission verification method, a computing device, and a computer-readable storage medium to solve the technical defects existing in the prior art.
[0006] According to a first aspect of an embodiment of this specification, a permission verification system is provided, including:
[0007] A resource object management module, configured to generate a first authorization code, wherein the first authorization code carries a validity period of the resource object;
[0008] The resource management module is configured to generate a second authorization code, wherein the second authorization code carries a resource validity period and an interface authority;
[0009] The permission verification module is configured to obtain the first authorization code and the second authorization code when an interface call request is detected, verify the validity time of the object to which the resource belongs, the resource validity time and the interface permission, and if the verification passes, run the interface called by the interface call request and return the interface call result.
[0010] Optionally, the permission verification module is further configured to:
[0011] Determine whether the validity period of the object to which the resource belongs and the validity period of the resource are both within the validity period;
[0012] If so, further determining whether the interface called by the interface call request belongs to the interface included in the interface authority;
[0013] If so, the verification is confirmed to be successful.
[0014] Optionally, the resource management module is further configured to:
[0015] Receiving input additional verification information, and carrying the additional verification information in the second authorization code;
[0016] Accordingly, the permission verification module is further configured as follows:
[0017] When the validity period of the object to which the resource belongs, the resource validity period and the interface authority verification are passed, the additional verification information is verified. If the verification is passed, the interface called by the interface call request is run and the interface call result is returned.
[0018] Optionally, the first authorization code also carries a whitelist of objects to which the resource belongs and a valid calling domain name, and the permission verification module is further configured as follows:
[0019] Determine whether the requester of the interface call request is a requester in the whitelist, and determine whether the calling domain name of the interface call request is the valid calling domain name;
[0020] If so, the operation steps of verifying the validity period of the object to which the resource belongs, the resource validity period and the interface authority are executed.
[0021] Optionally, the resource object management module is further configured to:
[0022] When the object to which the resource belongs is established, the object information of the object to which the resource belongs is obtained, and the first authorization code is generated according to the object information.
[0023] Optionally, the resource object management module is further configured to:
[0024] The input object information is received, and the first authorization code is generated according to the object information.
[0025] Optionally, the resource management module is further configured to:
[0026] When a transaction order is generated, the second authorization code is generated according to the order information of the transaction order.
[0027] Optionally, the resource management module is further configured to:
[0028] The input resource information is received, and the second authorization code is generated according to the resource information.
[0029] According to a second aspect of an embodiment of this specification, a permission verification method is provided, including:
[0030] Generate a first authorization code, where the first authorization code carries the validity period of the object to which the resource belongs;
[0031] Generate a second authorization code, which carries the resource validity period and interface authority;
[0032] When an interface call request is detected, the first authorization code and the second authorization code are obtained, and the validity time of the object to which the resource belongs, the resource validity time and the interface authority are verified. If the verification passes, the interface called by the interface call request is run, and the interface call result is returned.
[0033] Optionally, the verifying the validity period of the object to which the resource belongs, the resource validity period, and the interface authority includes:
[0034] Determine whether the validity period of the object to which the resource belongs and the validity period of the resource are both within the validity period;
[0035] If so, further determining whether the interface called by the interface call request belongs to the interface included in the interface authority;
[0036] If so, the verification is confirmed to be successful.
[0037] Optionally, the method further includes:
[0038] Receiving input additional verification information, and carrying the additional verification information in the second authorization code;
[0039] When the validity period of the object to which the resource belongs, the resource validity period and the interface authority verification are passed, the additional verification information is verified. If the verification is passed, the interface called by the interface call request is run and the interface call result is returned.
[0040] Optionally, the first authorization code also carries a whitelist of objects to which the resource belongs and a valid calling domain name, and the method further includes:
[0041] Determine whether the requester of the interface call request is a requester in the whitelist, and determine whether the calling domain name of the interface call request is the valid calling domain name;
[0042] If so, the operation steps of verifying the validity period of the object to which the resource belongs, the resource validity period and the interface authority are executed.
[0043] Optionally, generating a first authorization code includes:
[0044] When the object to which the resource belongs is established, the object information of the object to which the resource belongs is obtained, and the first authorization code is generated according to the object information.
[0045] Optionally, generating a first authorization code includes:
[0046] The input object information is received, and the first authorization code is generated according to the object information.
[0047] Optionally, generating a second authorization code includes:
[0048] When a transaction order is generated, the second authorization code is generated according to the order information of the transaction order.
[0049] Optionally, generating a second authorization code includes:
[0050] The input resource information is received, and the second authorization code is generated according to the resource information.
[0051] According to a third aspect of an embodiment of this specification, a computing device is provided, including:
[0052] Memory and processor;
[0053] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions:
[0054] Generate a first authorization code, where the first authorization code carries the validity period of the object to which the resource belongs;
[0055] Generate a second authorization code, which carries the resource validity period and interface authority;
[0056] When an interface call request is detected, the first authorization code and the second authorization code are obtained, and the validity time of the object to which the resource belongs, the resource validity time and the interface authority are verified. If the verification passes, the interface called by the interface call request is run, and the interface call result is returned.
[0057] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of any of the permission verification methods are implemented.
[0058] The permission verification system provided in this specification includes a resource object management module, a resource management module and a permission verification module. The resource object management module is configured to generate a first authorization code, and the first authorization code carries the effective time of the resource object; the resource management module is configured to generate a second authorization code, and the second authorization code carries the resource effective time and interface authority; the permission verification module is configured to obtain the first authorization code and the second authorization code when an interface call request is detected, and verify the effective time of the resource object, the resource effective time and the interface authority. If the verification passes, the interface called by the interface call request is run, and the interface call result is returned. In this case, the resource object management module, the resource management module and the permission verification module are integrated, and the permission control of the resource object can be performed through the first authorization code, and the permission control of the specific resource can be performed through the second authorization code. Only two sets of authorization codes can be used to achieve complex permission control of resources, and the timeliness of the resource object and specific resources, as well as the management of interface permissions are effectively achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a structural diagram of a permission verification system provided in an embodiment of this specification;
[0060] Figure 2 This is a flow chart of a first permission verification method provided in an embodiment of this specification;
[0061] Figure 3 It is a processing flow chart of a permission verification method applied to an application program provided in an embodiment of this specification;
[0062] Figure 4 is a flow chart of a second permission verification method provided in an embodiment of this specification;
[0063] Figure 5 is a flowchart of a third permission verification method provided in an embodiment of this specification;
[0064] Figure 6 is a flowchart of a fourth permission verification method provided in an embodiment of this specification;
[0065] Figure 7 It is a structural block diagram of a computing device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0066] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0067] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0068] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0069] First, the terms involved in one or more embodiments of this specification are explained.
[0070] Authorization code: refers to the string combination that the interface caller uses to obtain the interface call permission. An authorization code contains two fields: key and secret. By verifying the legitimacy of the key and secret, it is determined whether a return is required for the interface call, thereby achieving permission control.
[0071] Next, the basic concept of the permission verification system provided in this specification is briefly described.
[0072] OAuth 2.0 technology is OAuth, which sets up an authorization layer between the third party and the service provider. The resource owner stores the resources in the service provider and provides a token to the third party, specifying the authority scope and validity period of the token. The third party directly logs in to the authorization layer through the token to obtain the corresponding resources.
[0073] However, the above solution requires setting up an authorization layer between the third party and the service provider and providing a token to the third party. The solution is relatively complicated, resulting in more R&D resources and higher R&D costs. For platforms with limited R&D resources and high timeliness requirements, it is difficult to quickly develop and implement it.
[0074] With the development of network technology, ISV (Independent Software Vendor) can use the effective service resources of the network to design rich and diverse interactive applications based on customer needs, combine the services provided by different service providers, and produce aggregated innovation effects, so that third parties can call the corresponding application interfaces to obtain corresponding resources.
[0075] Therefore, this specification provides a permission verification system, in which the resource object management module is configured to generate a first authorization code, and the first authorization code carries the validity period of the resource object; the resource management module is configured to generate a second authorization code, and the second authorization code carries the resource validity period and interface authority; the permission verification module is configured to obtain the first authorization code and the second authorization code when an interface call request is detected, and verify the validity period of the resource object, the resource validity period and the interface authority, and if the verification passes, run the interface called by the interface call request, and return the interface call result. In this case, the resource object management module, the resource management module and the permission verification module are integrated, and the permission control of the resource object can be directly performed through the first authorization code, and the permission control of the specific resource can be performed through the second authorization code, thereby realizing complex resource management in a simple way.
[0076] In this specification, a permission verification system is provided. This specification also relates to a permission verification method, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0077] Figure 1 A schematic diagram of the structure of a permission verification system provided according to an embodiment of this specification is shown, and the system includes:
[0078] The resource object management module 102 is configured to generate a first authorization code, wherein the first authorization code carries the validity period of the resource object;
[0079] The resource management module 104 is configured to generate a second authorization code, wherein the second authorization code carries a resource validity period and an interface authority;
[0080] The permission verification module 106 is configured to obtain the first authorization code and the second authorization code when an interface call request is detected, verify the validity time of the object to which the resource belongs, the resource validity time and the interface permission, and if the verification passes, run the interface called by the interface call request and return the interface call result.
[0081] In one or more implementations of this embodiment, the permission verification module 106 is further configured to:
[0082] Determine whether the validity period of the object to which the resource belongs and the validity period of the resource are both within the validity period;
[0083] If so, further determining whether the interface called by the interface call request belongs to the interface included in the interface authority;
[0084] If so, the verification is confirmed to be successful.
[0085] In one or more implementations of this embodiment, the resource management module 104 is further configured to:
[0086] Receiving input additional verification information, and carrying the additional verification information in the second authorization code;
[0087] Accordingly, the permission verification module 106 is further configured to:
[0088] When the validity period of the object to which the resource belongs, the resource validity period and the interface authority verification are passed, the additional verification information is verified. If the verification is passed, the interface called by the interface call request is run and the interface call result is returned.
[0089] In one or more implementations of this embodiment, the first authorization code also carries a whitelist of objects to which the resource belongs and a valid calling domain name, and the permission verification module 106 is further configured as follows:
[0090] Determine whether the requester of the interface call request is a requester in the whitelist, and determine whether the calling domain name of the interface call request is the valid calling domain name;
[0091] If so, the operation steps of verifying the validity period of the object to which the resource belongs, the resource validity period and the interface authority are executed.
[0092] In one or more implementations of this embodiment, the resource object management module 102 is further configured to:
[0093] When the object to which the resource belongs is established, the object information of the object to which the resource belongs is obtained, and the first authorization code is generated according to the object information.
[0094] In one or more implementations of this embodiment, the resource object management module 102 is further configured to:
[0095] The input object information is received, and the first authorization code is generated according to the object information.
[0096] In one or more implementations of this embodiment, the resource management module 104 is further configured to:
[0097] When a transaction order is generated, the second authorization code is generated according to the order information of the transaction order.
[0098] In one or more implementations of this embodiment, the resource management module 104 is further configured to:
[0099] The input resource information is received, and the second authorization code is generated according to the resource information.
[0100] The permission verification system provided in this specification includes a resource object management module, a resource management module and a permission verification module. The resource object management module is configured to generate a first authorization code, and the first authorization code carries the effective time of the resource object; the resource management module is configured to generate a second authorization code, and the second authorization code carries the resource effective time and interface authority; the permission verification module is configured to obtain the first authorization code and the second authorization code when an interface call request is detected, and verify the effective time of the resource object, the resource effective time and the interface authority. If the verification passes, the interface called by the interface call request is run, and the interface call result is returned. In this case, the resource object management module, the resource management module and the permission verification module are integrated, and the permission control of the resource object can be performed through the first authorization code, and the permission control of the specific resource can be performed through the second authorization code. Only two sets of authorization codes can be used to achieve complex permission control of resources, and the timeliness of the resource object and specific resources, as well as the management of interface permissions are effectively achieved.
[0101] The above is a schematic scheme of a permission verification system of this embodiment. It should be noted that the technical scheme of the permission verification system and the technical scheme of the permission verification method described below are of the same concept, and the details not described in detail in the technical scheme of the permission verification system can be found in the description of the technical scheme of the permission verification method described below.
[0102] Figure 2 A flowchart of a permission verification method provided according to an embodiment of this specification is shown, and the method specifically includes the following steps:
[0103] Step 202: Generate a first authorization code, where the first authorization code carries the validity period of the object to which the resource belongs.
[0104] Specifically, the first authorization code is an authorization code for the object to which the resource belongs. The first authorization code carries relevant information about the object to which the resource belongs, so as to facilitate the subsequent verification of the authority of the object to which the resource belongs through the first authorization code. The object to which the resource belongs refers to the owner of the resource or the developer of the resource, such as the producer of resources such as video images or an independent software developer. The validity period of the object to which the resource belongs refers to the validity period of the cooperation between the object to which the resource belongs and the service provider. The service provider can be used to store the resources provided by the object to which the resource belongs. For example, the validity period of the object to which the resource belongs can be 2 years, 3 years, 5 years, etc.
[0105] In actual applications, when the resource-owning object stores the resource in a service provider, it is necessary to sign a cooperation agreement with the service provider to determine the cooperation period. If the cooperation period exceeds the period, the third party will not be able to obtain the resources of the resource-owning object through the service provider. Therefore, in this manual, a first authorization code can be generated according to the cooperation agreement between the resource-owning object and the service provider. Subsequently, the permission of the first authorization code can be verified to automatically manage the validity period of the cooperation of the resource-owning object, thereby achieving efficient and automatic management and control of the resource-owning object, and greatly improving the efficiency of the resource-owning object’s settlement in the service provider.
[0106] In one or more implementations of this embodiment, after the object to which the resource belongs determines to store the resource on the service provider, the service provider may automatically obtain relevant information of the object to which the resource belongs and generate a first authorization code. At this time, the specific implementation process of generating the first authorization code may be:
[0107] When the object to which the resource belongs is established, the object information of the object to which the resource belongs is obtained, and the first authorization code is generated according to the object information.
[0108] Specifically, the establishment of a project by the object to which the resource belongs refers to the object to which the resource belongs determining to store resources in the service provider, that is, determining to cooperate with the service provider. In actual implementation, if it is detected that the object to which the resource belongs and the service provider have signed a cooperation agreement, the establishment of the project by the object to which the resource belongs is determined, and the service provider automatically obtains the object information of the object to which the resource belongs in the cooperation agreement, that is, the effective time of the cooperation in the cooperation agreement signed between the object to which the resource belongs and the service provider, and then automatically generates the first authorization code based on the effective time.
[0109] When the object to which the resource belongs determines to cooperate with the service provider (i.e., the object to which the resource belongs establishes a project), the service provider can automatically obtain the object information of the object to which the resource belongs, and then automatically generate a first authorization code. The process of generating the first authorization code is simple and convenient, and the entire process does not require the participation of staff, which reduces the workload of staff and improves the efficiency of generating the first authorization code, thereby improving the efficiency of subsequent permission verification.
[0110] In one or more implementations of this embodiment, the first authorization code may also be manually generated, and the specific implementation process may be:
[0111] The input object information is received, and the first authorization code is generated according to the object information.
[0112] In actual applications, if the service provider cannot automatically obtain the object information of the object to which the resource belongs, the first authorization code cannot be generated. In order to ensure the success rate of generating the first authorization code, the object information of the object to which the resource belongs can also be manually entered in this manual. For example, the staff of the object to which the resource belongs and the staff of the service provider sign a paper cooperation agreement, and only the cooperation period is determined in the paper cooperation agreement. At this time, the staff of the service provider can manually enter the object information of the object to which the resource belongs (i.e., the validity period), and the service provider receives the input object information and generates the first authorization code based on the object information.
[0113] In this manual, the object information of the object to which the resource belongs can be automatically obtained, thereby automatically generating a first authorization code; the staff can also manually input the object information of the object to which the resource belongs and manually generate the first authorization code, thereby adapting to various situations in actual application scenarios and ensuring that the first authorization code can be successfully generated, thereby ensuring that the subsequent permission verification process can proceed normally.
[0114] Step 204: Generate a second authorization code, which carries resource validity period and interface authority.
[0115] Specifically, based on the generation of the first authorization code, a second authorization code will be further generated.
[0116] In actual applications, the second authorization code is an authorization code for a specific resource. The second authorization code carries relevant information about the specific resource, which facilitates the subsequent verification of the authority to the specific resource through the second authorization code. The resource validity period refers to the length of time a third party purchases the resource, such as 1 month, 2 months, 3 months, etc. Interface authority refers to the interface authority of a third party to purchase a resource, that is, the interface of the resource that can be called through the service provider. For example, when calling a resource, 10 interfaces may be involved, but the authority purchased by the third party can only call 5 of them in the service provider. At this time, the interface authority will include the 5 interfaces that the third party has authority to call in the service provider.
[0117] In actual applications, after a third party purchases resources, there will be a purchase period, and when each resource is called, there will be a valid interface (that is, the interface to which the third party has authority, which can be called within the service provider), and there will also be an invalid interface (that is, the interface to which the third party does not have authority, which cannot be called within the service provider). Only when the interface requested by the third party is an interface for which it has authority can the interface be called within the service provider. Therefore, in this manual, a second authorization code can be generated based on the specific information of the resource, and subsequently, the authority of the second authorization code can be verified to achieve management and control of specific resources.
[0118] In one or more implementations of this embodiment, the second authorization code may be automatically generated according to the transaction order. The specific implementation process of generating the second authorization code may be:
[0119] When a transaction order is generated, the second authorization code is generated according to the order information of the transaction order.
[0120] Specifically, order information may include purchase information, purchase permissions, etc. After the resource is commercialized and put on the shelves, a third party can purchase the resource, and a transaction order will be generated after the purchase, and the transaction order will include order information. In actual implementation, if it is detected that a transaction order is generated, the service provider can automatically obtain the order information in the transaction order, that is, the purchase duration, purchase permissions, etc., determine the purchase duration as the resource validity period, determine the interface included in the purchase permission as the interface permission, and then automatically generate a second authorization code based on the resource validity period and interface permission.
[0121] When a third party purchases resources (i.e., generates a transaction order), the service provider can automatically obtain the order information in the transaction order, and then automatically generate a second authorization code. The process of generating the second authorization code is simple and convenient, and the entire process does not require the participation of staff, which reduces the workload of staff and improves the efficiency of generating the second authorization code, thereby improving the efficiency of subsequent permission verification.
[0122] In one or more implementations of this embodiment, the second authorization code may also be manually generated, and the specific implementation process may be:
[0123] The input resource information is received, and the second authorization code is generated according to the resource information.
[0124] In actual applications, if the service provider cannot automatically obtain the order information of the transaction order, the second authorization code cannot be generated. In order to ensure the success rate of generating the second authorization code, the manual also allows manual entry of resource information. For example, a third party purchases resources offline and signs a paper purchase agreement, which specifies the purchase period, interface permissions, and other information. At this time, the service provider's staff can manually enter the resource information (i.e., resource validity period, interface permissions, etc.), and the service provider receives the input resource information and generates the second authorization code based on the resource information.
[0125] In this manual, resource information can be automatically obtained to automatically generate a second authorization code; or a staff member can manually input resource information and manually generate a second authorization code, so as to adapt to various situations in actual application scenarios and ensure that the second authorization code can be successfully generated, thereby ensuring that the subsequent permission verification process can proceed normally.
[0126] Step 206: When an interface call request is detected, the first authorization code and the second authorization code are obtained, and the validity time of the object to which the resource belongs, the resource validity time and the interface authority are verified. If the verification passes, the interface called by the interface call request is run, and the interface call result is returned.
[0127] Specifically, on the basis of generating the second authorization code, further, when an interface call request is detected, the first authorization code and the second authorization code will be obtained, and the validity time of the object to which the resource belongs, the resource validity time and the interface authority will be verified. If the verification passes, the interface called by the interface call request will be run, and the interface call result will be returned.
[0128] In actual applications, after the resources are online, the third party can use the resources, that is, they can call the corresponding interface. After the third party initiates an interface call request, the service provider can detect the interface call request, and then obtain the first authorization code and the second authorization code of the resource corresponding to the interface call request, and verify the first authorization code and the second authorization code. According to the verification result, it is determined whether to run the interface called by the interface call request.
[0129] In one or more implementations of this embodiment, the valid time of the object to which the resource belongs, the resource valid time and the interface authority are verified, and the specific implementation process may be:
[0130] Determine whether the validity period of the object to which the resource belongs and the validity period of the resource are both within the validity period;
[0131] If so, further determining whether the interface called by the interface call request belongs to the interface included in the interface authority;
[0132] If so, the verification is confirmed to be successful.
[0133] In actual applications, whether the validity period of the resource object is within the validity period can be determined by judging whether the current time is within the cooperation period between the resource object and the service provider; whether the validity period of the resource is within the validity period can be determined by judging whether the current time is within the purchase period of the resource by a third party.
[0134] For example, the validity period of the resource object carried by the first authorization code is 3 years, the validity period of the resource carried by the second authorization code is 1 month, and the interface permissions are interface a, interface b, and interface c. Assuming that the current time is the second year of the cooperation agreement signed between the resource object and the service provider, and it is the 7th day after the third party purchased the resource, it is determined that the validity period of the resource object and the resource are both within the validity period. Assuming that the interface to be called by the interface call request is interface c, it is determined that the interface called by the interface call request belongs to the interface included in the interface permission. At this time, it is determined that the verification is passed, interface c is run, and the interface c call is returned successfully.
[0135] By judging whether the validity time of the object to which the resource belongs and the validity time of the resource are both within the validity period, it is determined whether the cooperation between the object to which the resource belongs and the service provider has expired, and whether the purchase period for the third party to purchase the resource has expired. After determining that the object to which the resource belongs and the service provider are within the cooperation period, and that the third party to purchase the resource is within the purchase period, it is further determined whether the interface to be called by the interface call request is an interface with calling authority, thereby realizing management and control over the cooperation period between the object to which the resource belongs and the service provider, the purchase period of the resource by the third party, and the purchase authority. The management of the objects to which the resource belongs in the complex resource market, the management of resource transaction orders, and the complete authority control process are realized in a simple way (two-layer authorization code).
[0136] Next, see Figure 3 , taking the resource as an application and the resource owner as an independent software developer (ISV) as an example, the above permission verification process is explained in detail with examples:
[0137] When it is detected that an independent software developer has established a project with a service provider, the open platform in the service provider obtains the effective time of the independent software developer and generates a first authorization code based on the effective time. After that, the independent software developer can carry out subsequent interface development and interface configuration work in the service provider. After the interface development and interface configuration work are completed, the application developed by the independent software developer can be put online for use by a third party. In addition, when the service provider establishes a project, the independent software developer can commercialize the application and put the application on the application market for sale. After a transaction order is generated, the second authorization code can be automatically generated based on the order information. When a third party uses the application, it needs to call the corresponding interface. During the calling process, the first authorization code and the second authorization code are obtained, and the first authorization code and the second authorization code are verified. After the verification passes, the corresponding interface is run and the interface call result is returned.
[0138] Assume that the service provider is WeChat, the resource is a game app, and the independent software developer is a game company. The game company wants to put a small game program on the WeChat platform so that users can directly call the interface of the small game program through the WeChat platform to operate the game. Therefore, the game company and WeChat have established a cooperation agreement (i.e., project establishment). After the project is established, WeChat's open platform generates a first authorization code based on the effective period of cooperation between WeChat and the game company, and develops and configures the interface of the small game program. After the interface development and interface configuration work are completed, the small game program can be put online, and subsequent third-party users can directly call the corresponding interface in the WeChat platform to operate the small game. After the third-party user purchases the small game and generates a transaction order, the second authorization code can be automatically generated according to the order information. When the third-party user opens the small game program in WeChat, it is necessary to call the corresponding interface. During the calling process, the first authorization code and the second authorization code are obtained, and the first authorization code and the second authorization code are verified. After the verification passes, the corresponding interface is run to open the small game program.
[0139] Next, let's take the example of a paid video resource, a film and television production company, and a video playback software as the service provider to explain the permission verification process in detail:
[0140] A film and television production company has produced a video and wants to put the video on a video playback software so that users can watch the video through the video playback software. Therefore, the film and television production company and the video playback software have established a cooperation agreement (i.e., project establishment). After the project is established, the open platform of the video playback software can generate a first authorization code based on the effective period of cooperation with the film and television production company, and develop and configure the playback interface of the video. After the interface development and interface configuration work is completed, the video can be put online, and subsequent third-party users can directly call the corresponding interface in the video playback software to play the video. After a third-party user purchases the video and generates a transaction order, a second authorization code can be automatically generated based on the order information. When a third-party user opens the video in the video playback software, it is necessary to call the corresponding interface. During the call process, the first authorization code and the second authorization code are obtained, and the first authorization code and the second authorization code are verified. After the verification passes, the corresponding interface is run to play the video.
[0141] The permission verification method provided in this specification can first generate a first authorization code, which carries the validity period of the object to which the resource belongs; and generate a second authorization code, which carries the validity period of the resource and interface permissions; then, when an interface call request is detected, the first authorization code and the second authorization code are obtained, and the validity period of the object to which the resource belongs, the resource validity period and the interface permissions are verified. If the verification passes, the interface called by the interface call request is run, and the interface call result is returned. In this case, the first authorization code can be used to control the validity period of the object to which the resource belongs, and the second authorization code can be used to control the validity period and interface permissions of specific resources. Complex permission control of resources can be achieved with only two sets of authorization codes, effectively realizing the timeliness of the object to which the resource belongs and the specific resources, as well as the management of interface permissions.
[0142] Figure 4 A flowchart of a second permission verification method provided according to an embodiment of this specification is shown, and the method specifically includes the following steps:
[0143] Step 402: Generate a first authorization code, which carries the validity period of the object to which the resource belongs.
[0144] It should be noted that the specific implementation process of step 402 is Figure 2 The specific implementation process of step 202 in the embodiment shown is the same, and the details can be referred to above Figure 2 The relevant contents of step 202 in the illustrated embodiment will not be described in detail in this specification.
[0145] Step 404: Generate a second authorization code, which carries resource validity period, interface authority and additional verification information.
[0146] Specifically, the additional verification information refers to other information of the resource, which can be the information of the resource itself. It can also be relevant information of the third party that purchased the resource, which can be used for subsequent permission verification. For example, the additional verification information can be the account information and credit information of the third party that purchased the resource. It can be verified later whether the account information of the third party is an illegal account and whether the credit information of the third party meets the preset credit standard, so as to determine whether the verification is passed.
[0147] In actual applications, the staff of the service provider can customize the verification conditions through the service provider according to the actual scenario, so that when generating the second authorization code, personalized additional verification information is added to the second authorization code, and personalized permission verification is performed subsequently.
[0148] In one or more implementations of this embodiment, if the second authorization code is automatically generated through a transaction order, the specific implementation process of generating the second authorization code may be:
[0149] When a transaction order is generated, obtaining order information of the transaction order;
[0150] Receive input additional verification information;
[0151] The second authorization code is generated according to the order information and the additional verification information.
[0152] It should be noted that the specific implementation process of automatically generating the second authorization code through the transaction order is the same as Figure 2 The specific implementation process of automatically generating the second authorization code according to the transaction order in step 202 in the embodiment shown is similar, and the details can be referred to above. Figure 2 In the illustrated embodiment, the relevant contents of automatically generating the second authorization code according to the transaction order in step 202 will not be described in detail in this specification.
[0153] In one or more implementations of this embodiment, if the second authorization code is generated by manual input, the specific implementation process of generating the second authorization code may be:
[0154] Receive input resource information and additional verification information;
[0155] The second authorization code is generated according to the resource information and the additional verification information.
[0156] It should be noted that the specific implementation process of generating the second authorization code by manual input is the same as Figure 2 The specific implementation process of manually generating the second authorization code in step 202 in the embodiment shown is similar, and the details can be referred to above. Figure 2The related contents of manually generating the second authorization code in step 202 in the illustrated embodiment will not be further described in this specification.
[0157] In this manual, resource information and additional verification information can be automatically obtained to automatically generate a second authorization code; or a staff member can manually input resource information and additional verification information to manually generate a second authorization code, thereby adapting to various situations in actual application scenarios and ensuring that the second authorization code can be successfully generated, thereby ensuring that the subsequent permission verification process can proceed normally.
[0158] Step 406: When an interface call request is detected, the first authorization code and the second authorization code are obtained, and the validity period of the object to which the resource belongs, the resource validity period, and the interface authority are verified.
[0159] It should be noted that the specific implementation process of step 406 is Figure 2 The verification process of step 406 in the embodiment shown is similar, and the details can be referred to above. Figure 2 The relevant contents of step 206 in the illustrated embodiment will not be described in detail in this specification.
[0160] Step 408: If the validity period of the object to which the resource belongs, the resource validity period and the interface authority verification are passed, the additional verification information is verified. If the verification is passed, the interface called by the interface call request is run and the interface call result is returned.
[0161] In actual applications, if the second authorization code also carries additional verification information, the additional verification information can also be verified on the basis of verifying the validity time of the object to which the resource belongs, the resource validity time and the interface permissions. The specific verification process of the additional verification information depends on the specific content or type of the additional verification information. For example, if the additional verification information is the account information of a third party that purchases the resource, it can be verified whether the account information of the third party is an illegal account, thereby determining whether the verification passes; if the additional verification information is the credit information of the third party that purchases the resource, it can be verified whether the credit information of the third party meets the preset credit standards, thereby determining whether the verification passes.
[0162] On the basis of verifying the effective time of the object to which the resource belongs, the resource effective time and the interface authority, the additional verification information carried in the second authorization code can also be verified to determine whether the verification passes. The general effective time and interface authority allocation can be combined with personalized authorization conditions to form a general (effective time, interface authority) + personalized (additional verification information) permission verification method.
[0163] The permission verification method provided in this specification can first generate a first authorization code, wherein the first authorization code carries the validity period of the object to which the resource belongs; and generate a second authorization code, wherein the second authorization code carries the validity period of the resource, interface authority, and additional verification information; then, when an interface call request is detected, the first authorization code and the second authorization code are obtained, and the validity period of the object to which the resource belongs, the resource validity period, and the interface authority are verified; and when the validity period of the object to which the resource belongs, the resource validity period, and the interface authority are verified, the additional verification information is verified, and if the verification passes, the interface called by the interface call request is run, and the interface call result is returned. In this case, the validity period of the object to which the resource belongs can be controlled by the first authorization code, and the validity period and interface authority of the specific resource can be controlled by the second authorization code. Complex permission control of resources can be achieved through only two sets of authorization codes, and the timeliness of the object to which the resource belongs and the specific resource, as well as the management of interface authority, are effectively achieved. In addition, the general effective time and interface permission allocation can be combined with personalized authorization conditions (i.e., additional verification information) to form a general (effective time, interface permission) + personalized (additional verification information) permission verification method, which can better adapt to different situations in actual application scenarios and is more flexible in application. It can further realize the management and control of the permissions of third parties, thereby improving the user experience of service providers.
[0164] Figure 5 A flowchart of a third permission verification method provided according to an embodiment of this specification is shown, and the method specifically includes the following steps:
[0165] Step 502: Generate a first authorization code, which carries the validity period of the object to which the resource belongs, the whitelist of the object to which the resource belongs, and a valid calling domain name.
[0166] Specifically, the whitelist of the resource object refers to the IP addresses that can access the resources provided by the resource object; the valid calling domain name of the resource object refers to the domain name that can call the resources provided by the resource object.
[0167] In one or more implementations of this embodiment, when a project is established for the object to which the resource belongs, object information of the object to which the resource belongs is obtained, and the first authorization code is generated according to the object information.
[0168] In actual implementation, after the service provider automatically obtains the effective time of cooperation in the cooperation agreement signed between the object to which the resource belongs and the service provider, it can also automatically obtain the whitelist and valid calling domain name of the object to which the resource belongs, and then automatically generate the first authorization code based on the effective time, whitelist and valid calling domain name.
[0169] When the object to which the resource belongs determines to cooperate with the service provider (i.e. the object to which the resource belongs establishes a project), the service provider can automatically obtain the validity period, whitelist and valid calling domain name of the object to which the resource belongs, and then automatically generate a first authorization code. The process of generating the first authorization code is simple and convenient. The entire process does not require the participation of staff, which reduces the workload of staff and improves the efficiency of generating the first authorization code, thereby improving the efficiency of subsequent permission verification.
[0170] In one or more implementations of this embodiment, input object information may also be received, and the first authorization code may be generated according to the object information. Specifically, the object information includes the validity period, whitelist, and valid calling domain name of the object to which the resource belongs.
[0171] In this manual, the validity period, whitelist and valid calling domain name of the object to which the resource belongs can be automatically obtained, thereby automatically generating the first authorization code; the staff can also manually enter the validity period, whitelist and valid calling domain name of the object to which the resource belongs, and manually generate the first authorization code, so as to adapt to various situations in actual application scenarios and ensure that the first authorization code can be successfully generated, thereby ensuring that the subsequent permission verification process can proceed normally.
[0172] Step 504: Generate a second authorization code, which carries resource validity period and interface authority.
[0173] It should be noted that the specific implementation process of step 504 is Figure 2 The specific implementation process of step 204 in the embodiment shown is the same, and the details can be referred to above Figure 2 The relevant contents of step 204 in the illustrated embodiment will not be described in detail in this specification.
[0174] Step 506: When an interface call request is detected, obtain the first authorization code and the second authorization code, determine whether the requester of the interface call request is the requester in the whitelist, and determine whether the calling domain name of the interface call request is the valid calling domain name. If so, execute the following step 508; if not, execute the following step 510.
[0175] In actual applications, by judging whether the IP address of the requester (third party) of the interface call request is the IP address included in the whitelist, and whether the calling domain name of the interface call request is the valid calling domain name, it can be determined whether the requester can access the resources provided by the object to which the resource belongs, thereby realizing permission management of the requester who initiates the interface call request, so that only the requester allowed by the object to which the resource belongs can call the interface and access the resources provided by the object to which the resource belongs.
[0176] Step 508: Verify the effective time of the object to which the resource belongs, the effective time of the resource, and the interface authority. If the verification passes, run the interface called by the interface call request and return the interface call result.
[0177] It should be noted that the specific implementation process of step 508 is Figure 2 The verification process of step 206 in the embodiment shown is similar, and the details can be referred to above. Figure 2 The relevant contents of step 206 in the illustrated embodiment will not be described in detail in this specification.
[0178] Step 510: Return the error reason.
[0179] The permission verification method provided in this specification can first generate a first authorization code, which carries the effective time of the object to which the resource belongs, the whitelist of the object to which the resource belongs, and the valid calling domain name; and generate a second authorization code, which carries the effective time of the resource and the interface authority; then, when an interface call request is detected, the first authorization code and the second authorization code are obtained, and it is determined whether the requester of the interface call request is the requester in the whitelist, and whether the calling domain name of the interface call request is the valid calling domain name. If so, the effective time of the object to which the resource belongs, the effective time of the resource, and the interface authority are verified. If the verification passes, the interface called by the interface call request is run, and the interface call result is returned. In this case, the effective time of the object to which the resource belongs can be controlled by the first authorization code, and the effective time and interface authority of the specific resource can be controlled by the second authorization code. Complex authority control of resources can be achieved through only two sets of authorization codes, and the timeliness of the object to which the resource belongs and the specific resources, as well as the management of interface authority are effectively achieved. In addition, permission control is implemented for the requester who initiates the interface call request, so that only the requester allowed by the resource object can call the interface and access the resources provided by the resource object. It also implements control over the restrictions on the cooperation plans of the resource object (through whitelists, domain name control, etc.), greatly improving the efficiency of the resource object's settlement in the service provider.
[0180] Figure 6 A flowchart of a fourth permission verification method provided according to an embodiment of this specification is shown, and the method specifically includes the following steps:
[0181] Step 602: Generate a first authorization code, which carries the validity period, whitelist, valid calling domain name, ICP registration number, permissions, name, and organizational code of the object to which the resource belongs.
[0182] In actual applications, in addition to carrying relevant information for permission verification (valid time, whitelist, and valid calling domain name of the object to which the resource belongs), the first authorization code can also carry some relevant information of the object to which the resource belongs (ICP registration number, permissions owned, name, organizational code, etc.), so as to facilitate querying the information of the object to which the resource belongs when calling the resource subsequently.
[0183] It should be noted that the specific implementation process of step 602 is Figure 2 The process of step 202 in the embodiment shown is similar, and the details can be referred to above. Figure 2 The relevant contents of step 202 in the illustrated embodiment will not be described in detail in this specification.
[0184] Step 604: Generate a second authorization code, which carries the resource validity period, interface permissions, additional verification information, the name of the object to which the resource belongs, the valid calling domain name of the object to which the resource belongs, the whitelist of the object to which the resource belongs, and the organizational code of the object to which the resource belongs.
[0185] In actual applications, the second authorization code may carry part of the information of the first authorization code. When the information of the object to which the resource belongs needs to be queried later, it can be queried by the first authorization code or the second authorization code.
[0186] It should be noted that a resource provided by the resource object can be purchased by multiple third parties, that is, a first authorization code can correspond to multiple second authorization codes, but the name of the resource object, valid calling domain name, whitelist, organization code and other related information of the resource object in the multiple second authorization codes should be the same, and the same as the relevant information of the resource object carried in the corresponding first authorization code.
[0187] It should be noted that the specific implementation process of step 604 is Figure 2 The process of step 204 in the embodiment shown is similar, and the details can be referred to above. Figure 2 The relevant contents of step 204 in the illustrated embodiment will not be described in detail in this specification.
[0188] Step 606: When an interface call request is detected, the first authorization code and the second authorization code are obtained, and the validity time of the object to which the resource belongs, the resource validity time and the interface authority are verified. If the verification passes, the interface called by the interface call request is run, and the interface call result is returned.
[0189] It should be noted that the specific implementation process of step 606 is Figure 2 The process of step 206 in the embodiment shown is similar, and the details can be referred to above. Figure 2The relevant contents of step 206 in the illustrated embodiment will not be described in detail in this specification.
[0190] Step 608: During the operation of the interface, if a query request for the object to which the resource belongs is detected, the whitelist, valid calling domain name, name, and organization code of the object to which the resource belongs are queried through the first authorization code or the second authorization code.
[0191] In actual applications, the first authorization code and the second authorization code can carry relevant information about the object to which the resource belongs. When the relevant information about the object to which the resource belongs needs to be queried later, the first authorization code or the second authorization code can be used directly to query.
[0192] The permission verification method provided in this specification can first generate a first authorization code, which carries the effective time of the object to which the resource belongs, the white list of the object to which the resource belongs, and the effective calling domain name; and generate a second authorization code, which carries the effective time of the resource and the interface authority; then, when an interface call request is detected, the first authorization code and the second authorization code are obtained, and it is determined whether the requester of the interface call request is the requester in the white list, and whether the calling domain name of the interface call request is the effective calling domain name. If so, the effective time of the object to which the resource belongs, the effective time of the resource and the interface authority are verified. If the verification passes, the interface called by the interface call request is run, and the interface call result is returned; during the operation of the interface, if a query request for the object to which the resource belongs is detected, the white list, effective calling domain name, name, and organization code of the object to which the resource belongs are queried through the first authorization code or the second authorization code. In this case, the effective time of the object to which the resource belongs can be controlled by the first authorization code, and the effective time and interface authority of the specific resource can be controlled by the second authorization code. Only two sets of authorization codes can be used to realize complex authority control of resources, and the timeliness of the object to which the resource belongs and the specific resources, as well as the management of interface authority, are effectively realized. Furthermore, the first authorization code and the second authorization code may carry relevant information about the object to which the resource belongs. When the relevant information about the object to which the resource belongs needs to be queried later, the first authorization code or the second authorization code may be used to directly perform the query.
[0193] Figure 7 The structure block diagram of a computing device 700 provided according to an embodiment of the present specification is shown. The components of the computing device 700 include but are not limited to a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and the database 750 is used to store data.
[0194] The computing device 700 also includes an access device 740 that enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0195] In one embodiment of the present specification, the above components of the computing device 700 and Figure 7 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 7 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0196] The computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 700 may also be a mobile or stationary server.
[0197] The processor 720 is used to execute the following computer executable instructions:
[0198] Generate a first authorization code, where the first authorization code carries the validity period of the object to which the resource belongs;
[0199] Generate a second authorization code, which carries the resource validity period and interface authority;
[0200] When an interface call request is detected, the first authorization code and the second authorization code are obtained, and the validity time of the object to which the resource belongs, the resource validity time and the interface authority are verified. If the verification passes, the interface called by the interface call request is run, and the interface call result is returned.
[0201] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned permission verification method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned permission verification method.
[0202] An embodiment of the present specification further provides a computer-readable storage medium storing computer instructions, which are used when executed by a processor to:
[0203] Generate a first authorization code, where the first authorization code carries the validity period of the object to which the resource belongs;
[0204] Generate a second authorization code, which carries the resource validity period and interface authority;
[0205] When an interface call request is detected, the first authorization code and the second authorization code are obtained, and the validity time of the object to which the resource belongs, the resource validity time and the interface authority are verified. If the verification passes, the interface called by the interface call request is run, and the interface call result is returned.
[0206] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned permission verification method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned permission verification method.
[0207] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0208] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0209] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that this specification is not limited by the order of the actions described, because according to this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this specification.
[0210] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0211] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A permission verification system, comprising: A resource object management module is configured to generate a first authorization code, wherein the first authorization code carries the validity period of the resource object and is used to indicate that the authorization of the resource object is obtained according to the cooperation agreement; A resource management module is configured to generate a second authorization code, wherein the second authorization code carries a resource validity period and an interface authority, wherein the second authorization code is generated based on the first authorization code; The permission verification module is configured to obtain the first authorization code and the second authorization code when an interface call request is detected, verify the validity time of the object to which the resource belongs, the resource validity time and the interface permission, and if the verification passes, run the interface called by the interface call request and return the interface call result.
2. According to the permission verification system of claim 1, the permission verification module is further configured as follows: Determine whether the validity period of the object to which the resource belongs and the validity period of the resource are both within the validity period; If so, further determining whether the interface called by the interface call request belongs to the interface included in the interface authority; If so, the verification is confirmed to be successful.
3. According to the permission verification system of claim 1, the resource management module is further configured as follows: receiving input additional verification information, and carrying the additional verification information in the second authorization code; Accordingly, the permission verification module is further configured as follows: When the validity period of the object to which the resource belongs, the resource validity period and the interface authority verification are passed, the additional verification information is verified. If the verification is passed, the interface called by the interface call request is run and the interface call result is returned.
4. According to the permission verification system of claim 1, the first authorization code also carries a whitelist of objects to which the resource belongs and a valid calling domain name, and the permission verification module is further configured as follows: Determine whether the requester of the interface call request is a requester in the whitelist, and determine whether the calling domain name of the interface call request is the valid calling domain name; If so, the operation steps of verifying the validity period of the object to which the resource belongs, the resource validity period and the interface authority are executed.
5. According to the permission verification system of claim 1, the resource object management module is further configured as follows: When the object to which the resource belongs is established, the object information of the object to which the resource belongs is obtained, and the first authorization code is generated according to the object information.
6. According to the permission verification system of claim 1, the resource object management module is further configured as follows: The input object information is received, and the first authorization code is generated according to the object information.
7. The permission verification system according to claim 1, wherein the resource management module is further configured to: When a transaction order is generated, the second authorization code is generated according to the order information of the transaction order.
8. The permission verification system according to claim 1, wherein the resource management module is further configured to: The input resource information is received, and the second authorization code is generated according to the resource information.
9. A permission verification method, comprising: Generate a first authorization code, the first authorization code carries the validity period of the object to which the resource belongs, and is used to indicate that the authorization of the object to which the resource belongs is obtained according to the cooperation agreement; Generate a second authorization code, the second authorization code carries the resource validity period and interface authority, wherein the second authorization code is generated based on the first authorization code; When an interface call request is detected, the first authorization code and the second authorization code are obtained, and the validity time of the object to which the resource belongs, the resource validity time and the interface authority are verified. If the verification passes, the interface called by the interface call request is run, and the interface call result is returned.
10. The permission verification method according to claim 9, wherein the verification of the effective time of the object to which the resource belongs, the effective time of the resource and the interface permission comprises: Determine whether the validity period of the object to which the resource belongs and the validity period of the resource are both within the validity period; If so, further determining whether the interface called by the interface call request belongs to the interface included in the interface authority; If so, the verification is confirmed to be successful.
11. The permission verification method according to claim 9, further comprising: receiving input additional verification information, and carrying the additional verification information in the second authorization code; When the validity period of the object to which the resource belongs, the resource validity period and the interface authority verification are passed, the additional verification information is verified. If the verification is passed, the interface called by the interface call request is run and the interface call result is returned.
12. The permission verification method according to claim 9, wherein the first authorization code also carries a whitelist of objects to which the resource belongs and a valid calling domain name, and the method further comprises: Determine whether the requester of the interface call request is a requester in the whitelist, and determine whether the calling domain name of the interface call request is the valid calling domain name; If so, the operation steps of verifying the validity period of the object to which the resource belongs, the resource validity period and the interface authority are executed.
13. The permission verification method according to claim 9, wherein generating the first authorization code comprises: When the object to which the resource belongs is established, the object information of the object to which the resource belongs is obtained, and the first authorization code is generated according to the object information.
14. The permission verification method according to claim 9, wherein generating the first authorization code comprises: The input object information is received, and the first authorization code is generated according to the object information.
15. The permission verification method according to claim 9, wherein generating the second authorization code comprises: When a transaction order is generated, the second authorization code is generated according to the order information of the transaction order.
16. The permission verification method according to claim 9, wherein generating the second authorization code comprises: The input resource information is received, and the second authorization code is generated according to the resource information.
17. A computing device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the following method: Generate a first authorization code, the first authorization code carries the validity period of the object to which the resource belongs, and is used to indicate that the authorization of the object to which the resource belongs is obtained according to the cooperation agreement; Generate a second authorization code, the second authorization code carries the resource validity period and interface authority, wherein the second authorization code is generated based on the first authorization code; When an interface call request is detected, the first authorization code and the second authorization code are obtained, and the validity time of the object to which the resource belongs, the resource validity time and the interface authority are verified. If the verification passes, the interface called by the interface call request is run, and the interface call result is returned.
18. A computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the permission verification method described in any one of claims 9 to 16.
