Authentication method, device, equipment and storage medium

By uniformly configuring the authentication fields and rules of each interface in the authentication dictionary set, the problem of complex and inconsistent authentication rule configuration in the existing technology is solved, and higher authentication accuracy and developer work efficiency are achieved.

CN118503944BActive Publication Date: 2024-10-08BANK OF NINGBO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410939031.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-10-08
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

In the existing technology, the configuration of authentication rules is complex and inconsistent, resulting in heavy workload for developers, and the flow causes abnormal authentication results, affecting accuracy.

Method used

By uniformly configuring the authentication fields and rules of each interface in the authentication dictionary set, querying the target authentication fields and rules based on the interface identifier, unified authentication processing is performed, reducing the need for developers to configure individually.

Benefits of technology

It reduces the workload of developers, improves the accuracy of authentication results, and avoids abnormal authentication results caused by the flow of developers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118503944B_ABST
    Figure CN118503944B_ABST
Patent Text Reader

Abstract

The present disclosure provides an authentication method, device, equipment and storage medium, and relates to the field of computer technology. The method includes: obtaining a user's access request to the current interface; based on the identifier of the current interface, querying the target authentication field required by the current interface in the authentication dictionary set; based on the target authentication rule corresponding to the target authentication field, determining the target user information or target access range required for authenticating the target authentication field from the access request; based on the target authentication rule and the target user information or the target access range, determining the authentication result of the target authentication field; if the authentication results of all target authentication fields are passed, then determining the authentication result of the access request is passed, thereby reducing the workload of developers, avoiding the situation where the authentication result is abnormal due to the developer's unclear understanding of field naming and authentication rules, and improving the accuracy of the authentication result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to an authentication method, device, equipment and storage medium. Background Art

[0002] Authentication is the process of verifying the user's identity to ensure that the user has the authority to access the business resources corresponding to the interface. In the existing solution, developers mainly add authentication rules corresponding to each interface, but the number of interfaces that need to be configured is often large, which greatly increases the workload of developers. In addition, each developer may have inconsistent field naming and authentication rule configuration for the interface. For example, if there are multiple names for a field that represents consent, if developers change, the authentication results may be abnormal due to unclear field naming and authentication rules, affecting the accuracy of the authentication results. Summary of the invention

[0003] The present disclosure provides an authentication method, device, equipment and storage medium to at least solve the above technical problems existing in the prior art.

[0004] According to a first aspect of the present disclosure, an authentication method is provided, the method comprising: obtaining a user's access request to a current interface, the access request comprising user information and an access scope; based on an identifier of the current interface, querying an authentication dictionary set for a target authentication field required by the current interface, the authentication dictionary set comprising an identifier of the interface and an authentication field corresponding to the interface; based on a target authentication rule corresponding to the target authentication field, determining from the access request the target user information or target access scope required for authenticating the target authentication field; based on the target authentication rule and the target user information or target access scope, determining an authentication result of the target authentication field; if the authentication results of all the target authentication fields are passed, determining that the authentication result of the access request is passed.

[0005] In one possible implementation, before querying the target authentication field required by the current interface in the authentication dictionary set based on the identifier of the current interface, it also includes: receiving interface information, the interface information including the identifier of the interface, the authentication field corresponding to the interface, and the menu value and button value corresponding to the interface; based on the interface information, constructing an authentication dictionary set corresponding to the interface, the authentication dictionary set including a dictionary identification number, a dictionary name, a first dictionary extension item and a second dictionary extension item; wherein the dictionary identification number is the identifier of the interface, the dictionary name is a text formed by concatenating the authentication fields corresponding to the interface, the first dictionary extension item is the correspondence between the actual name and the historical name of the authentication field corresponding to the interface, and the second dictionary extension item is the menu value and button value corresponding to the interface.

[0006] In one possible implementation, the authentication field corresponding to the interface includes at least one of menu authentication, button authentication, range authentication, line authentication, organization authentication, personnel authentication and approval details authentication.

[0007] In one possible implementation, before determining the target user information or target access scope required to authenticate the target authentication field from the access request, it also includes: determining the target authentication rule corresponding to the target authentication field in an authentication rule set, and the authentication rule set includes the authentication field and the authentication rule corresponding to the authentication field.

[0008] In one possible implementation, the authentication rule set includes: the authentication rule corresponding to the menu authentication: if the menu value in the access request is in the menu value of the current interface, the menu authentication passes, otherwise it fails; the authentication rule corresponding to the button authentication: if the button value in the access request is in the button value of the current interface, the button authentication passes, otherwise it fails; the authentication rule corresponding to the range authentication: if the access range in the access request is empty or the access range in the access request is in the access range of the user session information, the range authentication passes, otherwise it fails; the authentication rule corresponding to the line authentication: if the line in the access request is empty or the line in the access request and the line authorized by the user and the result after the operation are greater than 0, the line authentication passes, otherwise it fails. It will fail; the authentication rules corresponding to the organization authentication: if the organization information in the access request is empty, or the organization corresponding to the line in the access request or the organization with the smallest value of the user line overlaps with all the organizations corresponding to the user, the organization authentication will pass, otherwise it will fail; the authentication rules corresponding to the personnel authentication: if the organization path corresponding to the line of the position number in the access request is in the organization path corresponding to the user's authorized line, or if the organization path corresponding to the line of the work number in the access request is in the organization path corresponding to the user's authorized line, the personnel authentication will pass, otherwise it will fail; the authentication rules corresponding to the approval details authentication: if the approval details in the access request are in the approval details authorized by the user, the approval details authentication will pass, otherwise it will fail.

[0009] In one possible implementation, an authentication method further includes: if the target authentication field required by the current interface cannot be found in the authentication dictionary set, determining that the authentication result of the access request is passed.

[0010] In one possible implementation, an authentication method further includes: if it is determined that the authentication result of the access request is failed, an error message is issued, wherein the error message includes a target authentication field and a failure reason for the authentication result being failed.

[0011] According to a second aspect of the present disclosure, an authentication device is provided, the device comprising: an acquisition module, used to acquire a user's access request to a current interface, the access request comprising user information and an access scope; a query module, used to query an authentication dictionary set for a target authentication field required by the current interface based on an identifier of the current interface, the authentication dictionary set comprising an interface identifier and an authentication field corresponding to the interface; a first determination module, used to determine, from the access request, target user information or a target access scope required for authenticating the target authentication field based on a target authentication rule corresponding to the target authentication field; a second determination module, used to determine an authentication result of the target authentication field based on the target authentication rule and the target user information or the target access scope; and a third determination module, used to determine that the authentication result of the access request is passed if the authentication results of all the target authentication fields are passed.

[0012] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0013] at least one processor; and

[0014] a memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present disclosure.

[0016] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method described in the present disclosure.

[0017] The present invention discloses an authentication method, apparatus, device and storage medium, which sets the authentication field corresponding to each interface and the authentication rule corresponding to each authentication field in advance. After receiving the user's access request to the current interface, it is only necessary to query the target authentication field corresponding to the current interface and the target authentication rule corresponding to the target authentication field from the authentication dictionary set and the authentication rule set, and authenticate the access request according to the target authentication field and the target authentication rule. Developers do not need to add corresponding authentication rules for each interface separately, which reduces the workload of developers. In addition, the naming of authentication fields and authentication rules are unified, which avoids the situation where abnormal authentication results are caused by developers' unclear understanding of field naming and authentication rules, and improves the accuracy of authentication results.

[0018] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:

[0020] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0021] Figure 1 A schematic diagram showing a flow chart of an authentication method according to an embodiment of the present disclosure Figure 1 ;

[0022] Figure 2 A schematic diagram showing a flow chart of an authentication method according to an embodiment of the present disclosure Figure 2 ;

[0023] Figure 3 A schematic diagram showing a flow chart of an authentication method according to an embodiment of the present disclosure Figure 3 ;

[0024] Figure 4 A schematic diagram of the structure of an authentication device according to an embodiment of the present disclosure is shown;

[0025] Figure 5 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0026] In order to make the purpose, features, and advantages of the present disclosure more obvious and easy to understand, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0027] Figure 1 A schematic diagram showing a flow chart of an authentication method according to an embodiment of the present disclosure Figure 1 ,like Figure 1 As shown, an authentication method includes:

[0028] Step S101, obtaining a user's access request to the current interface.

[0029] In this embodiment, the access request includes user information and access scope. The user information includes information such as the user's position number, work number, line and organization. The access scope is the scope that the user wants to access, including information such as the menu value, button value, resource range and approval details that the user wants to access.

[0030] Step S102: Based on the identifier of the current interface, the target authentication field required by the current interface is searched in the authentication dictionary set.

[0031] In this embodiment, the authentication dictionary set includes the identifier of the interface and the authentication field corresponding to the interface. The authentication field corresponding to the interface includes: menu authentication, button authentication, range authentication, line authentication, organization authentication, personnel authentication and approval details authentication. At least one of the authentication fields can be queried in the authentication dictionary set according to the identifier of the current interface accessed by the user. For example, the target authentication fields required by the current interface A may be: menu authentication, range authentication and personnel authentication. That is, if the user wants to access the current interface A, the user needs to perform menu authentication, range authentication and personnel authentication.

[0032] Step S103: based on the target authentication rule corresponding to the target authentication field, determine the target user information or target access scope required for authenticating the target authentication field from the access request.

[0033] In this embodiment, a target authentication rule corresponding to each target authentication field is configured in advance. After the target authentication field required by the current interface is obtained, the target user information or target access scope required for authenticating the target authentication field can be determined from the access request based on the target authentication rule corresponding to the target authentication field. For example, if the target authentication fields required by the current interface A are: menu authentication, range authentication, and personnel authentication, it can be determined according to the target authentication rule that menu authentication requires obtaining the menu value that the user wants to access, range authentication requires obtaining the resource range that the user wants to access, and personnel authentication requires obtaining the user's position number or work number. Therefore, it is necessary to determine the menu value and resource range that the user wants to access, as well as the user's position number or work number from the access request, wherein the menu value that the user wants to access is the target access range required for menu authentication, the resource range that the user wants to access is the target access range required for range authentication, and the user's position number or work number is the target user information required for personnel authentication.

[0034] Step S104: determining the authentication result of the target authentication field based on the target authentication rule and the target user information or the target access scope.

[0035] In this embodiment, after obtaining the target authentication rules and target user information or target access range corresponding to each target authentication field, it can be determined whether the target user information or target access range corresponding to each target authentication field meets the authentication pass condition in the target authentication rules corresponding to the target authentication field. If so, the authentication result of the target authentication field is passed, otherwise it is failed.

[0036] Step S105: If the authentication results of all target authentication fields are passed, it is determined that the authentication result of the access request is passed.

[0037] In this embodiment, if the authentication results of all target authentication fields of the current interface are passed, the authentication result of the user's access request to the current interface is determined to be passed, otherwise the authentication result of the user's access request to the current interface is determined to be failed.

[0038] In the present disclosure, the authentication fields corresponding to each interface and the authentication rules corresponding to each authentication field are set in advance. After receiving the user's access request to the current interface, it is only necessary to query the target authentication field corresponding to the current interface and the target authentication rule corresponding to the target authentication field from the authentication dictionary set and the authentication rule set, and authenticate the access request according to the target authentication field and the target authentication rule. Developers do not need to add corresponding authentication rules for each interface separately, which reduces the workload of developers. In addition, the naming of the authentication fields and the authentication rules are unified, avoiding the situation where abnormal authentication results are caused by the developers' unclear understanding of the field naming and authentication rules, and improving the accuracy of the authentication results. In addition, the authentication fields corresponding to each interface and the authentication rules corresponding to each authentication field can be set according to actual conditions, which is highly flexible.

[0039] In one possible implementation, before step S102 "searching the authentication dictionary set for a target authentication field required by the current interface based on the identifier of the current interface", an authentication method further includes:

[0040] Receive interface information, the interface information includes an identifier of the interface, authentication fields corresponding to the interface, and menu values ​​and button values ​​corresponding to the interface; based on the interface information, construct an authentication dictionary set corresponding to the interface, the authentication dictionary set includes a dictionary identification number ID (Identity document), a dictionary name, a first dictionary extension item, and a second dictionary extension item; wherein the dictionary identification number is the identifier of the interface, the dictionary name is a text concatenated from the authentication fields corresponding to the interface, the first dictionary extension item is the correspondence between the actual name and the historical name of the authentication fields corresponding to the interface, and the second dictionary extension item is the menu value and button value corresponding to the interface.

[0041] In this embodiment, the identifier of the interface can be the Uniform Resource Locator (URL) of the interface, and the correspondence between the actual name and the historical name of each authentication field in the first extension item of the dictionary is spliced ​​with the "&" symbol. For example, the first extension item of the dictionary of interface B can be: range=scope&org=orgId&bizLine=line, indicating that "range" is used instead of "scope" as the actual name of range authentication, "org" is used instead of "orgId" as the actual name of organization authentication, and "bizLine" is used instead of "line" as the actual name of line authentication in interface B; the second extension item of the dictionary of interface B can be: menu=1.3,1.4&function=1.5.3, indicating that the menu values ​​of interface B include 1.3 and 1.4, and the button values ​​of interface B include 1.5.3.

[0042] In one possible implementation, the authentication dictionary set may be shown in the following table:

[0043]

[0044] In the present disclosure, the authentication fields, menu values, button values ​​and naming changes of the authentication fields corresponding to the interface are configured in the authentication dictionary set, so that the target authentication fields, menu values ​​and button values ​​corresponding to the current interface can be queried from the authentication dictionary set later, avoiding the developers to configure the authentication fields, menu values ​​and button values ​​for each interface separately, reducing the workload of developers, and unifying the naming of the authentication fields in the authentication dictionary set, avoiding abnormal authentication results due to unclear field naming by developers, and improving the accuracy of the authentication results.

[0045] Figure 2 A schematic diagram showing a flow chart of an authentication method according to an embodiment of the present disclosure Figure 2 ,like Figure 2 As shown, an authentication method includes:

[0046] Step S201, obtaining a user's access request to the current interface.

[0047] Step S202: Based on the identifier of the current interface, the target authentication field required by the current interface is searched in the authentication dictionary set.

[0048] The specific implementation details of step S201-step S202 are similar to those of step S101-step S102 and will not be repeated here.

[0049] Step S203: determine the target authentication rule corresponding to the target authentication field in the authentication rule set.

[0050] In this embodiment, after searching the target authentication field required by the current interface in the authentication dictionary set, it is also necessary to determine the target authentication rule corresponding to the target authentication field in the pre-configured authentication rule set, and the authentication rule set includes the authentication field and the authentication rule corresponding to the authentication field.

[0051] In one possible implementation, the authentication rule set includes:

[0052] Authentication rules corresponding to menu authentication: if the menu value in the access request is in the menu value of the current interface, the menu authentication passes, otherwise it fails;

[0053] Authentication rules corresponding to button authentication: if the button value in the access request is within the button value of the current interface, the button authentication passes, otherwise it fails;

[0054] Authentication rules corresponding to scope authentication: if the access scope in the access request is empty or the access scope in the access request is within the access scope of the user session information, then the scope authentication passes, otherwise it fails; wherein the user session information is the session information of the user on the current interface;

[0055] Authentication rules corresponding to line authentication: if the line in the access request is empty or the result of the bitwise AND operation between the line in the access request and the line authorized to the user by the current interface is greater than 0, the line authentication passes, otherwise it fails;

[0056] Authentication rules corresponding to institution authentication: if the institution information in the access request is empty, or the institution corresponding to the line in the access request or the institution with the smallest user line value overlaps with all the institutions corresponding to the user in the current interface, the institution authentication passes, otherwise it fails; that is, if the institution information in the access request is empty, the institution authentication passes; if there is a line in the access request, the institution ID corresponding to the line in the access request is taken for institution authentication; if there is no line in the access request, the institution ID with the smallest user line value is taken for institution authentication by default; the institution authentication mainly takes the institution ID corresponding to the line in the access request or the institution ID with the smallest user line value and compares it with all the institutions corresponding to the user; if there is an overlap, the institution authentication passes, wherein all the institutions corresponding to the user can be presented in the form of old institution tree and new institution tree;

[0057] Authentication rules corresponding to personnel authentication: if the organization path corresponding to the line of the position number in the access request is in the organization path corresponding to the user's authorized line, or the organization path corresponding to the line of the work number in the access request is in the organization path corresponding to the user's authorized line, the personnel authentication passes, otherwise it fails; that is, the statistical organization path corresponding to the line and organization query in the position number in the access request is compared with the statistical organization path of the user's current login line. If the queried statistical organization path contains the statistical organization path of the user's current login line, the authentication passes; the statistical organization path corresponding to the work number and line query in the access request is compared with the statistical organization path of the user's current login line. If the queried statistical organization path contains the statistical organization path of the user's current login line, the authentication passes.

[0058] Authentication rules corresponding to approval details authentication: if the approval details in the access request are in the approval details authorized by the user, the approval details authentication passes, otherwise it fails.

[0059] Step S204: based on the target authentication rule corresponding to the target authentication field, determine the target user information or target access scope required for authenticating the target authentication field from the access request.

[0060] Step S205: Determine the authentication result of the target authentication field based on the target authentication rule and the target user information or the target access scope.

[0061] Step S206: If the authentication results of all target authentication fields are passed, it is determined that the authentication result of the access request is passed.

[0062] The specific implementation details of step S204 to step S206 are similar to those of step S103 to step S105 and will not be repeated here.

[0063] In the present disclosure, the authentication rules corresponding to each authentication field are set in advance. After receiving the user's access request to the current interface, it is only necessary to query the target authentication field corresponding to the current interface and the target authentication rule corresponding to the target authentication field from the authentication dictionary set and the authentication rule set, and authenticate the access request according to the target authentication field and the target authentication rule. Developers do not need to add corresponding authentication rules for each interface separately, which reduces the workload of developers. In addition, the naming of authentication fields and authentication rules are unified, avoiding abnormal authentication results due to unclear field naming and authentication rules among developers, thereby improving the accuracy of authentication results.

[0064] Figure 3 A schematic diagram showing a flow chart of an authentication method according to an embodiment of the present disclosure Figure 3 ,like Figure 3 As shown, an authentication method includes:

[0065] Step S301: Obtain a user's access request to the current interface.

[0066] If the target authentication field required by the current interface is found in the authentication dictionary based on the identifier of the current interface, then steps S302 to S303 are executed:

[0067] Step S302: Based on the target authentication rule corresponding to the target authentication field, determine the target user information or target access scope required for authenticating the target authentication field from the access request.

[0068] Step S303: Determine the authentication result of the target authentication field based on the target authentication rule and the target user information or the target access scope.

[0069] If the authentication results of all target authentication fields are passed, step S304 is executed to determine that the authentication result of the access request is passed.

[0070] The specific implementation details of step S301 to step S304 are similar to those of step S101 to step S105 and will not be repeated here.

[0071] If the authentication result of the target authentication field is not passed, then execute step S305-step S306:

[0072] Step S305: determine that the authentication result of the access request is failed.

[0073] Step S306: Send an error message.

[0074] In this embodiment, if at least one of the target authentication fields of the current interface has an authentication failure result, the authentication result of the user's access request to the current interface is determined to be a failure, and an error message is issued. The error message includes the target authentication field for which the authentication result is a failure and the reason for the failure. For example, the reason for the failure may be that the access scope in the access request exceeds the access scope of the user session information, the button value in the access request is not the button value of the current interface, etc., so that the user can quickly determine the reason for the authentication failure and modify the access request according to the error message.

[0075] If the target authentication field required by the current interface is not found in the authentication dictionary set based on the identifier of the current interface, proving that the current interface does not need to authenticate the accessing user, step S304 is executed to determine that the authentication result of the access request is passed.

[0076] Figure 4 A schematic diagram of the structure of an authentication device according to an embodiment of the present disclosure is shown. Figure 4 As shown, an authentication device includes:

[0077] The acquisition module 10 is used to obtain the user's access request to the current interface, and the access request includes user information and access scope; the query module 11 is used to query the target authentication field required by the current interface in the authentication dictionary set based on the identifier of the current interface, and the authentication dictionary set includes the identifier of the interface and the authentication field corresponding to the interface, and the authentication field corresponding to the interface includes: menu authentication, button authentication, range authentication, line authentication, organization authentication, personnel authentication and approval details authentication. At least one of the authentication; the first determination module 12 is used to determine the target user information or target access scope required for authenticating the target authentication field from the access request based on the target authentication rule corresponding to the target authentication field; the second determination module 13 is used to determine the authentication result of the target authentication field based on the target authentication rule and the target user information or the target access scope; the third determination module 14 is used to determine that the authentication result of the access request is passed if the authentication results of all target authentication fields are passed.

[0078] In one possible implementation, an authentication device also includes a dictionary construction module for receiving interface information, the interface information including an identifier of the interface, an authentication field corresponding to the interface, and a menu value and a button value corresponding to the interface; based on the interface information, an authentication dictionary set corresponding to the interface is constructed, the authentication dictionary set including a dictionary identification number, a dictionary name, a first dictionary extension item and a second dictionary extension item; wherein the dictionary identification number is an identifier of the interface, the dictionary name is a text concatenated from the authentication fields corresponding to the interface, the first dictionary extension item is a correspondence between the actual name and the historical name of the authentication field corresponding to the interface, and the second dictionary extension item is a menu value and a button value corresponding to the interface.

[0079] In one possible implementation mode, the first determination module 12 is also used to: determine the target authentication rule corresponding to the target authentication field in the authentication rule set, the authentication rule set includes the authentication field and the authentication rule corresponding to the authentication field, wherein the authentication rule set includes: the authentication rule corresponding to the menu authentication: if the menu value in the access request is in the menu value of the current interface, the menu authentication passes, otherwise it fails; the authentication rule corresponding to the button authentication: if the button value in the access request is in the button value of the current interface, the button authentication passes, otherwise it fails; the authentication rule corresponding to the range authentication: if the access scope in the access request is empty or the access scope in the access request is in the access scope of the user session information, the range authentication passes, otherwise it fails; the authentication rule corresponding to the line authentication: if the line in the access request is empty or the line in the access request is If the line and the line authorized by the user and the result after the operation are greater than 0, the line authentication passes, otherwise it fails; the authentication rules corresponding to the organization authentication: if the organization information in the access request is empty, or the organization corresponding to the line in the access request or the organization with the smallest value of the user's line overlaps with all the organizations corresponding to the user, the organization authentication passes, otherwise it fails; the authentication rules corresponding to the personnel authentication: if the organization path corresponding to the line of the position number in the access request is in the organization path corresponding to the line authorized by the user, or if the organization path corresponding to the line of the work number in the access request is in the organization path corresponding to the line authorized by the user, the personnel authentication passes, otherwise it fails; the authentication rules corresponding to the approval details authentication: if the approval details in the access request are in the approval details authorized by the user, the approval details authentication passes, otherwise it fails.

[0080] In one possible implementation, the third determination module 14 is further configured to: if the target authentication field required by the current interface cannot be found in the authentication dictionary set, determine that the authentication result of the access request is passed.

[0081] In one possible implementation, an authentication device further includes an error reporting module, which is used to issue an error reporting message if it is determined that the authentication result of the access request is failed, and the error reporting message includes a target authentication field and a failure reason for the authentication result being failed.

[0082] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.

[0083] Figure 5A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0084] like Figure 5 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0085] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0086] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as an authentication method. For example, in some embodiments, an authentication method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of an authentication method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform an authentication method in any other appropriate manner (e.g., by means of firmware).

[0087] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0088] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0089] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0090] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0091] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0092] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0093] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0094] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0095] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. An authentication method, characterized in that: The method comprises: Obtaining a user's access request to the current interface, wherein the access request includes user information and access scope; Based on the identifier of the current interface, querying the target authentication field required by the current interface in an authentication dictionary set, wherein the authentication dictionary set includes the identifier of the interface and the authentication field corresponding to the interface; Based on the target authentication rule corresponding to the target authentication field, determining the target user information or the target access scope required for authenticating the target authentication field from the access request; Determining an authentication result of the target authentication field based on the target authentication rule and the target user information or the target access scope; If the authentication results of all the target authentication fields are passed, then it is determined that the authentication result of the access request is passed; Wherein, before searching the authentication dictionary for the target authentication field required by the current interface based on the identifier of the current interface, the method further includes: Receiving interface information, the interface information including an identifier of the interface, an authentication field corresponding to the interface, a menu value and a button value corresponding to the interface; Based on the interface information, construct an authentication dictionary set corresponding to the interface, wherein the authentication dictionary set includes a dictionary identification number, a dictionary name, a first dictionary extension item, and a second dictionary extension item; Among them, the dictionary identification number is the identifier of the interface, the dictionary name is the text spliced ​​together from the authentication fields corresponding to the interface, the first extended item of the dictionary is the correspondence between the actual name and the historical name of the authentication field corresponding to the interface, and the second extended item of the dictionary is the menu value and button value corresponding to the interface.

2. The method according to claim 1, characterized in that The authentication fields corresponding to the interface include: at least one of menu authentication, button authentication, range authentication, line authentication, organization authentication, personnel authentication and approval details authentication.

3. The method according to claim 2, characterized in that Before determining the target user information or the target access scope required for authenticating the target authentication field from the access request, the method further includes: A target authentication rule corresponding to the target authentication field is determined in an authentication rule set, wherein the authentication rule set includes an authentication field and an authentication rule corresponding to the authentication field.

4. The method according to claim 3, characterized in that The authentication rule set includes: The authentication rule corresponding to the menu authentication is: if the menu value in the access request is in the menu value of the current interface, the menu authentication passes, otherwise it fails; The authentication rule corresponding to the button authentication is: if the button value in the access request is within the button value of the current interface, the button authentication passes, otherwise it fails; The authentication rule corresponding to the scope authentication is: if the access scope in the access request is empty or the access scope in the access request is within the access scope of the user session information, the scope authentication passes, otherwise it fails; The authentication rule corresponding to the line authentication: if the line in the access request is empty or the line in the access request and the line authorized by the user and the result after the operation are greater than 0, the line authentication passes, otherwise it fails; Authentication rules corresponding to the institution authentication: if the institution information in the access request is empty, or if the institution corresponding to the line in the access request or the institution with the smallest value of the user line overlaps with all the institutions corresponding to the user, the institution authentication passes, otherwise it fails; The authentication rule corresponding to the personnel authentication: if the organization path corresponding to the line of the position number in the access request is in the organization path corresponding to the line of the user's authorization, or if the organization path corresponding to the line of the work number in the access request is in the organization path corresponding to the line of the user's authorization, the personnel authentication passes, otherwise it fails; The authentication rule corresponding to the approval details authentication is: if the approval details in the access request are in the approval details authorized by the user, the approval details authentication passes, otherwise it fails.

5. The method according to any one of claims 1 to 4, characterized in that: Also includes: If the target authentication field required by the current interface cannot be found in the authentication dictionary set, it is determined that the authentication result of the access request is passed.

6. The method according to any one of claims 1 to 4, characterized in that: Also includes: If it is determined that the authentication result of the access request is not passed, an error message is issued, and the error message includes the target authentication field of the authentication result not passed and the reason for the failure.

7. An authentication device, characterized in that: The device comprises: An acquisition module, used to acquire a user's access request to the current interface, wherein the access request includes user information and access scope; A query module, used to query the target authentication field required by the current interface in the authentication dictionary set based on the identifier of the current interface, wherein the authentication dictionary set includes the identifier of the interface and the authentication field corresponding to the interface; A first determination module, configured to determine, from the access request, target user information or a target access scope required for authenticating the target authentication field based on a target authentication rule corresponding to the target authentication field; A second determination module, configured to determine an authentication result of the target authentication field based on the target authentication rule and the target user information or the target access scope; A third determination module, configured to determine that the authentication result of the access request is passed if the authentication results of all the target authentication fields are passed; Wherein, before searching the authentication dictionary for the target authentication field required by the current interface based on the identifier of the current interface, the method further includes: Receiving interface information, the interface information including an identifier of the interface, an authentication field corresponding to the interface, a menu value and a button value corresponding to the interface; Based on the interface information, construct an authentication dictionary set corresponding to the interface, wherein the authentication dictionary set includes a dictionary identification number, a dictionary name, a first dictionary extension item, and a second dictionary extension item; Among them, the dictionary identification number is the identifier of the interface, the dictionary name is the text spliced ​​together from the authentication fields corresponding to the interface, the first extended item of the dictionary is the correspondence between the actual name and the historical name of the authentication field corresponding to the interface, and the second extended item of the dictionary is the menu value and button value corresponding to the interface.

8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to make a computer execute the method according to any one of claims 1-6.