Authentication method and device, electronic equipment and computer readable storage medium

By obtaining the address information of static resources and user authentication information, generating request information and performing permission verification, the security risks of static resource permission protection in the existing technology are solved, and efficient permission control and security improvement are achieved.

CN119603027APending Publication Date: 2025-03-11BOE TECHNOLOGY GROUP CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411720343.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

It is difficult for the existing technology to effectively protect the permissions of static resources, especially in Internet business systems, where the permissions of static resources are protected by security risks.

Method used

By obtaining the address information of the static resource and the authentication information of the user, generating request information, and determining whether the user has access to the static resource based on the permission verification information. This method can carry authentication information in the header of the request information, avoiding the occurrence of the address information, thereby improving security.

Benefits of technology

It realizes effective permission protection for static resources, improves security, and does not require compatible cookie modes, and improves the flexibility of the authentication mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603027A_ABST
    Figure CN119603027A_ABST
Patent Text Reader

Abstract

The invention provides an authentication method and device, electronic equipment and a computer readable storage medium, belongs to the technical field of Internet, and can solve the problem that existing static resource authentication is relatively poor in security and has very strong limitation. The authentication method disclosed by the invention comprises the following steps: acquiring address information of a static resource and authentication information of a user; generating request information according to the address information of the static resource and the authentication information of the user; generating permission verification information according to the request information; and judging whether the user has the access permission of the static resource according to the permission verification information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of Internet technology, and specifically relates to an authentication method and device, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the rapid development of the Internet, the complexity of business systems is increasing. In order to reduce the probability of security incidents in business systems, each page and even each request in the business system should be restricted to users with corresponding permissions. Among them, static resources are becoming more and more abundant, and the protection of permissions for static resources has also become a prominent issue. Summary of the invention

[0003] The present disclosure aims to solve at least one of the technical problems existing in the prior art, and provides an authentication method and device, an electronic device, and a computer-readable storage medium.

[0004] In a first aspect, an embodiment of the present disclosure provides an authentication method, the authentication method comprising:

[0005] Obtain the address information of static resources and the user's authentication information;

[0006] Generate request information according to the address information of the static resource and the authentication information of the user;

[0007] Generate authority verification information according to the request information;

[0008] Based on the permission verification information, determine whether the user has access rights to static resources.

[0009] In some embodiments, generating request information according to the address information of the static resource and the authentication information of the user includes:

[0010] A custom component is created, and the custom component is used to generate request information carrying the authentication information.

[0011] In some embodiments, generating request information according to the address information of the static resource and the authentication information of the user includes:

[0012] The address information of a certain type of static resource is intercepted, or the address information of some types of static resources is intercepted according to a regular expression, and request information carrying the authentication information is generated.

[0013] In some embodiments, the step of obtaining the address information of the static resource and the authentication information of the user also includes:

[0014] Store static resources in the browser cache space.

[0015] In some embodiments, the step of obtaining the address information of the static resource and the authentication information of the user also includes:

[0016] Apply for download permission for static resources based on the address information of the static resources;

[0017] According to the download authority, the static resources are downloaded to the local storage space.

[0018] In some embodiments, downloading the static resources to the local storage space includes:

[0019] The static resources are directly and completely downloaded to the local storage space.

[0020] In some embodiments, downloading the static resources to the local storage space includes:

[0021] The static resource is fragmented, and the fragmented static resource is downloaded to a local storage space.

[0022] In a second aspect, an embodiment of the present disclosure provides an authentication device, the authentication device comprising:

[0023] An acquisition module, configured to acquire address information of static resources and user authentication information;

[0024] A request module, configured to generate request information according to the address information of the static resource and the authentication information of the user;

[0025] A verification module, configured as a second generation module, configured to generate authority verification information according to the request information;

[0026] The judgment module is configured to judge whether the user has access rights to the static resources according to the permission verification information.

[0027] In a third aspect, an embodiment of the present disclosure provides an electronic device, the electronic device comprising:

[0028] at least one processor; and

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

[0030] The memory stores one or more computer programs that can be executed by the at least one processor. The one or more computer programs are executed by the at least one processor so that the at least one processor can perform the authentication method provided above.

[0031] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the authentication method provided above when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A flowchart of an authentication method provided in an embodiment of the present disclosure.

[0033] Figure 2 A schematic diagram of information interaction of an authentication method provided in an embodiment of the present disclosure.

[0034] Figure 3 A schematic diagram of information interaction of another authentication method provided in an embodiment of the present disclosure.

[0035] Figure 4 Schematic diagram of the Service Worker interception process.

[0036] Figure 5 A flowchart of another authentication method provided in an embodiment of the present disclosure.

[0037] Figure 6 A schematic diagram of information interaction of another authentication method provided in an embodiment of the present disclosure.

[0038] Figure 7 A schematic diagram of information interaction of yet another authentication method provided in an embodiment of the present disclosure.

[0039] Figure 8 A schematic diagram of the structure of an authentication device provided in an embodiment of the present disclosure.

[0040] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution 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, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure. In the absence of conflict, the various embodiments of the present disclosure and the various features in the embodiments can be combined with each other.

[0042] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, similar words such as "one", "one" or "the" do not indicate quantitative restrictions, but indicate that there is at least one. "Including" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects.

[0043] The "multiple or several" mentioned in this disclosure refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0044] In order to facilitate understanding of the embodiments of the present disclosure, special terms involved in the embodiments of the present disclosure are first described in detail.

[0045] URL: uniform resource locator, a way of addressing that is specifically set up to identify the location of resources on the Internet. The web page address we usually refer to is the URL. The uniform resource locator is a concise representation of the location and access method of resources that can be obtained from the Internet. It is the address of standard resources on the Internet. Every file on the Internet has a unique URL, which contains information indicating the location of the file and how the browser should handle it.

[0046] Cookie: HTTP Cookie (also called Web Cookie or Browser Cookie) is a small piece of data sent by the server to the user's browser and saved locally. The browser will store the cookie and carry it and send it to the server the next time it makes a request to the same server. Usually, it is used to tell the server whether two requests come from the same browser - such as keeping the user logged in. Cookies make it possible to record stable state information based on the stateless HTTP protocol.

[0047] Local Storage: A web-based storage mechanism that allows websites or applications written in JavaScript to store and access data in the browser for a long time.

[0048] Web-Components: Web-Components allow you to create reusable custom elements (their functionality is encapsulated outside your code) and use them in web applications. They include: Custom element, Shadow DOM, HTML template.

[0049] Service-Worker: Service-Worker is an event-driven worker registered at a specified source and path. It takes the form of a JavaScript file that controls the associated page or website, intercepts and modifies access and resource requests, and caches resources in a fine-grained manner. You can fully control how your application behaves in specific situations (the most common situation is when the network is unavailable).

[0050] Static resources: refers to various display style files displayed on the tab page, such as HTML files (HyperText Markup Language), JS (JavaScript) format files, CSS files (Cascading Style Sheets), and pictures in various formats as well as audio and video files. These resources generally do not need to be changed frequently during the application process, so they are called static resources.

[0051] Dynamic resources: refers to the specific business data content obtained from the backend. These resources need to be changed at any time according to business needs, so they are called dynamic resources.

[0052] Authentication refers to verifying whether a user has the authority to access a certain page or request in the system, in order to reduce the probability of security incidents in the business system.

[0053] In the related art, authentication of web resources on the Internet can be divided into the following types: the first is to achieve authentication through the file code or authentication information in the URL. This method requires the implementation of a jump page or jump interface, and all information in the URL is visible, easy to leak, and has low security. The second is to achieve authentication through a header that carries authentication information in the request. This method can only be used for ajax dynamic requests, and requests for static resources in web pages (for example: pictures) are automatically issued by the browser, and will not carry an authentication header, and cannot play a protective role. The third is to authenticate through cookies carrying authentication information. Although this method can achieve static resource authentication, it will cause the user authentication mechanism to be compatible with the cookie mode, limiting the flexibility of the user system technology implementation.

[0054] In view of this, the embodiments of the present disclosure provide an authentication method and device, an electronic device, and a computer-readable storage medium. The authentication method and device, electronic device, and computer-readable storage medium provided by the embodiments of the present disclosure will be further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0055] In a first aspect, the present disclosure provides an authentication method. Figure 1 A flowchart of an authentication method provided by an embodiment of the present disclosure is shown in FIG. Figure 1 As shown, the authentication method provided by the embodiment of the present disclosure includes the following steps S101 to S104.

[0056] S101, obtaining address information of static resources and user authentication information.

[0057] In the above step S101, the static resource can be a picture of Beijing, and its address information is the URL of the picture, such as src=" / images / img_beijing.jpg". The user's authentication information can be stored in the cookie of the web page or in Local Storage. Taking the membership information of a website as an example, if the authentication information contains the membership information, the user can access the high-definition picture. If the authentication information does not contain the membership information, the user has no right to access the high-definition picture.

[0058] S102, generating request information according to the address information of the static resource and the authentication information of the user.

[0059] In the above step S102, for the address information of the picture, a request message corresponding to the picture resource can be actively generated, and the request message carries the above authentication information. The authentication information can be set in the header of the request message. The request message can be sent to the backend server.

[0060] S103, generating authority verification information according to the request information.

[0061] In the above step S103, the backend server can verify the request information, that is, verify the authentication information carried by the request information, for example, by comparing the request information with the configuration information in the authentication configuration table. The authentication configuration table is used to store permission configuration information, and the permission configuration information includes the corresponding relationship between the request method, request path and / or request parameters and permissions.

[0062] S104: Determine whether the user has access rights to static resources based on the permission verification information.

[0063] In the above step S104, if the request information is the same as the configuration information in the authentication configuration table, the user has the access rights to the picture, and the browser can directly load the high-definition picture for the user to access. If the request information is different from the configuration information in the authentication configuration table, the user does not have the access rights to the picture, and the browser cannot load the high-definition picture.

[0064] In the authentication method provided by the embodiment of the present disclosure, when authenticating static resources, the authentication information can be set in the header of the request information, and does not appear in the address information. It is invisible during the sharing process. While facilitating sharing, the authentication information is more concealed, avoiding leakage of the authentication information during the sharing process, thereby improving the security of authentication. At the same time, the authentication information does not need to be carried in the cookie, so the user's authentication mechanism does not have to be compatible with the cookie mode, thereby improving the flexibility of the authentication mechanism.

[0065] In some embodiments, the above step S102 generates request information according to the address information of the static resource and the authentication information of the user, which specifically includes: creating a custom component, and using the custom component to generate request information carrying the authentication information.

[0066] With picture elements For example, when the developer sets the static image address to When the src attribute is set, the browser will automatically send a request to load the image resource. At this time, the request sent by the browser will only carry the necessary cookie information, and the developer cannot intervene in this process. If the software cannot use cookies as an authentication scheme for some reason or the user's browser prohibits the use of cookies, the image loading will fail due to the failure to pass the authentication. If the developer puts the authentication information into the image address URL, the URL is easily visible and recorded, so the security is not high.

[0067] Figure 2 A schematic diagram of information interaction of an authentication method provided by an embodiment of the present disclosure, such as Figure 2 As shown in the figure, Web-Components is a general term for a set of Web native APIs that allow us to create reusable custom components and use them in our Web applications just like native HTML tags. Element, temporarily named <auth-img>When the developer sets the static image address to the src attribute, it does not trigger the browser to automatically request the action, but instead sends an ajax request message based on the configuration (such as cookies or Local Storage, request header name, etc.), creates a browser internal object url with the requested data blob, and sets this url to <auth-img>Internal Native The image is loaded successfully on the tag src attribute.

[0068] When authenticating static resources, the authentication information can be set in the header of the request information, and does not appear in the address information. It is invisible during the sharing process. While facilitating sharing, the authentication information is more concealed, avoiding leakage of the authentication information during the sharing process, thereby improving the security of authentication. At the same time, the authentication information does not need to be carried in the cookie, so the user's authentication mechanism does not have to be compatible with the cookie mode, thereby improving the flexibility of the authentication mechanism.

[0069] In some embodiments, the above step S102 generates request information based on the address information of the static resource and the user's authentication information, specifically including: intercepting the address information of a certain type of static resource, or intercepting the address information of some types of static resources according to regular expressions, and generating request information carrying authentication information.

[0070] Service-Worker runs in the worker context, so it cannot access the DOM. It runs in a different thread than the main JavaScript thread that drives the application, so it does not cause blocking. For security reasons, Service-Worker can only be hosted by HTTPS.

[0071] Figure 3 A schematic diagram of information interaction of another authentication method provided in an embodiment of the present disclosure, Figure 4 This is a schematic diagram of the interception process of Service-Worker, such as Figure 3 and Figure 4 As shown, download and install Service-Worker, and put Service-Worker in the listening state. Service-Worker intercepts all requests, and can be configured to intercept only a certain type of request, or intercept request URLs according to regular expressions. For missed requests, they are directly released, and for hit requests, after interception, the authentication information is read from the cookie or Local Storage, and then an ajax request is sent separately. After background authentication, the static resource is returned.

[0072] like Figure 1 As shown, the above step S101, obtaining the address information of the static resource and the user's authentication information, also includes: step S100, storing the static resource in the browser cache space.

[0073] Figure 1 The authentication method shown is applicable to the authentication of static resources of small files. Before authenticating the static resources of small files, since the static resources of small files occupy a small space, the static resources can be first stored in the browser cache space to facilitate the authentication of the static resources. For example, the static resources of small files can be a small number of high-definition pictures.

[0074] Figure 5 A flowchart of another authentication method provided by an embodiment of the present disclosure is shown as follows: Figure 5 As shown, Figure 1 The authentication method shown differs in that Figure 5 Step S101 of the authentication method shown is to obtain the address information of the static resource and the authentication information of the user, and also includes the following steps S501 and S502.

[0075] S501, applying for download permission for static resources according to the address information of the static resources.

[0076] S502: Download static resources to local storage space according to download permissions.

[0077] Figure 5 The authentication method shown is suitable for the authentication of static resources of large files. Before authenticating the static resources of large files, since the static resources of large files occupy a large space and the browser memory space is limited, you can first apply for download permissions for the static resources and download the static resources to the local storage space. For example, you can download a large number of high-definition pictures to the local hard disk.

[0078] Figure 6 A schematic diagram of information interaction of another authentication method provided in an embodiment of the present disclosure, such as Figure 6 As shown, downloading static resources to the local storage space includes: directly downloading the static resources completely to the local storage space.

[0079] In actual applications, static resources can be downloaded completely to the local hard disk at one time for subsequent authentication.

[0080] Figure 7 A schematic diagram of information interaction of another authentication method provided in an embodiment of the present disclosure, such as Figure 7 As shown, downloading static resources to the local storage space includes: segmenting the static resources and downloading the segmented static resources to the local storage space.

[0081] Figure 7 The authentication method shown is the same as Figure 6 The authentication method shown differs in that Figure 7 In the authentication method shown, the fragmented static resources can be downloaded multiple times. For example, for a large number of high-definition pictures, only part of them can be downloaded each time, and the downloaded high-definition pictures are authenticated each time. This avoids increasing the download waiting time and improves access efficiency.

[0082] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.

[0083] In a second aspect, an embodiment of the present disclosure provides an authentication device, Figure 8 A schematic diagram of the structure of an authentication device provided in an embodiment of the present disclosure is shown in FIG. Figure 8 As shown, the authentication device provided by the embodiment of the present disclosure includes: an acquisition module 801, a request module 802, a verification module 803 and a judgment module 804.

[0084] The acquisition module 801 is configured to acquire the address information of the static resource and the authentication information of the user; the request module 802 is configured to generate the request information according to the address information of the static resource and the authentication information of the user; the verification module 803 is configured as the second generation module, configured to generate the permission verification information according to the request information; the judgment module 804 is configured to judge whether the user has the access right to the static resource according to the permission verification information.

[0085] It should be noted that the various modules in the above authentication device can be implemented in whole or in part by software, hardware, or a combination thereof. The above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules to implement the authentication method provided in any of the above embodiments.

[0086] In a third aspect, an embodiment of the present disclosure provides an electronic device, Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure is shown in FIG. Fig. 9 As shown, the electronic device provided by the embodiment of the present disclosure includes: at least one processor 901; at least one memory 902, and one or more I / O interfaces 903, which are connected between the processor 901 and the memory 902; wherein the memory 902 stores one or more computer programs that can be executed by at least one processor 901, and the one or more computer programs are executed by at least one processor 901 so that the at least one processor 901 can execute the authentication method provided by any of the above embodiments.

[0087] Each module in the above electronic device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module to implement the authentication method provided in any of the above embodiments.

[0088] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the authentication method provided in any of the above embodiments when executed by a processor / processing core. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.

[0089] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).

[0090] As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is known to those of ordinary skill in the art that communication media typically contain computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.

[0091] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0092] The computer program instructions for performing the disclosed operation may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the disclosed invention.

[0093] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.

[0094] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0095] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0096] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0097] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0098] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. An authentication method, characterized in that: The authentication method comprises: Obtain the address information of static resources and the user's authentication information; Generate request information according to the address information of the static resource and the authentication information of the user; Generate authority verification information according to the request information; Based on the permission verification information, determine whether the user has access rights to static resources.

2. The authentication method according to claim 1, characterized in that: The step of generating request information according to the address information of the static resource and the authentication information of the user includes: A custom component is created, and the custom component is used to generate request information carrying the authentication information.

3. The authentication method according to claim 1, characterized in that: The step of generating request information according to the address information of the static resource and the authentication information of the user includes: The address information of a certain type of static resource is intercepted, or the address information of some types of static resources is intercepted according to a regular expression, and request information carrying the authentication information is generated.

4. The authentication method according to claim 1, characterized in that: The step of obtaining the address information of the static resource and the authentication information of the user also includes: Store static resources in the browser cache space.

5. The authentication method according to claim 1, characterized in that: The step of obtaining the address information of the static resource and the authentication information of the user also includes: Apply for download permission for static resources based on the address information of the static resources; According to the download authority, the static resources are downloaded to the local storage space.

6. The authentication method according to claim 5, characterized in that: The downloading of static resources to the local storage space includes: The static resources are directly and completely downloaded to the local storage space.

7. The authentication method according to claim 5, characterized in that: The downloading of static resources to the local storage space includes: The static resource is fragmented, and the fragmented static resource is downloaded to a local storage space.

8. An authentication device, characterized in that: The authentication device comprises: An acquisition module, configured to acquire address information of static resources and user authentication information; A request module, configured to generate request information according to the address information of the static resource and the authentication information of the user; A verification module, configured as a second generation module, configured to generate authority verification information according to the request information; The judgment module is configured to judge whether the user has access rights to the static resources according to the permission verification information.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs executable by the at least one processor, and the one or more computer programs are executed by the at least one processor to enable the at least one processor to perform the authentication method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the authentication method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Webpage data capturing method and device, storage medium and equipment

    CN111552854A

  • Gateway-based interface authentication method and device

    CN116488837A

  • Method and device for realizing gateway authentication module

    CN118413345A

  • Page display method and device, equipment and medium

    CN119003908A