Web API regulating and controlling method based on middleware
A middleware and interface technology, applied in the field of WebAPI control based on middleware, can solve the problems of complex structure, inconvenient control, unable to improve the uniformity, stability and security of WebAPI control, so as to reduce the amount of code and reduce access. Pressure, good effect of promoting the use value
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0028] In the middleware-based WebAPI control method of the present invention, middleware is added between the WebAPI interface and the business processing layer, and the middleware sets corresponding policies according to the access requests sent by the WebAPI interface. The access request sent by one WebAPI interface corresponds to one or Multiple strategies, the middleware checks the access requests sent by the WebAPI interface in turn according to the corresponding strategies.
[0029] as attached figure 1 As shown, the steps of the control method are as follows:
[0030] (1) The WebAPI interface sends access requests to the middleware;
[0031] (2), the middleware intercepts the access request sent by the WebAPI interface, and judges whether there is a policy restriction:
[0032] ①. If there are policy restrictions, the corresponding policies will verify the access requests sent by the WebAPI interface in turn to determine whether all corresponding policy verifications...
Embodiment 2
[0056] The following takes a certain website as an example to describe the content of middleware regulation in detail, so as to make the object, features and advantages of the present invention clearer and easier to understand.
[0057] router.all('*', blacklist verification method);
[0058] router.get(' / xxx / aaa', [strategy 1, strategy 2,..., strategy n], business processing);
[0059] Blacklist verification is performed on all access requests sent by the WebAPI interface. If the client IP or identified user identity is in the blacklist, 403 is returned to prohibit the API request; otherwise, the access request sent by the WebAPI interface is passed on.
[0060] Strategy 1: If there must be a user identity. The setting operation is: take the token in the cookie for identity verification. If the corresponding user is legal, the verification succeeds and pass the access request sent by the WebAPI interface to the subsequent policy verification; otherwise, the request is termin...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com