User authority authentication method and apparatus
A technology of user authority and verification method, applied in the Internet field, can solve the problems of easy omission of authority judgment and a large amount of user authority verification code, so as to avoid omission of authority judgment, reduce the amount of code, and improve the accuracy and execution efficiency.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Example Embodiment
[0113] Example one:
[0114] For the operation request is a view request, suppose that Wang Wu has logged in, detects Wang Wu's view request, and enters the website to view the product, such as http: / / www.example.com / product / view / 1, and then perform the following authority judgments in turn step:
[0115] 1. The user ID of King Five is 3;
[0116] 2. The role ID associated with user ID 3 is obtained from the preset user role association table as 3;
[0117] 3. Obtained from the preset role permission association table, the permission ID associated with the role ID of 3 is 1;
[0118] 4. The authorization ID with authorization ID 1 obtained from the preset authorization table is App\Http\Controllers\ProductController@view;
[0119] 5. Obtain the routing ID corresponding to the view request: App\Http\Controllers\ProductController@view, and compare it with the authorization ID obtained in the previous step, and enter the controller that processes the view request. There is no custom autho...
Example Embodiment
[0120] Embodiment two:
[0121] For the operation request is a view request, suppose that Wang Wu has logged in and entered the URL of the editing product, such as http: / / www.example.com / product / edit / 1, and proceeded with the following permission judgment steps:
[0122] 1. The user ID of King Five is 3;
[0123] 2. The role ID associated with user ID 3 is obtained from the preset user role association table as 3;
[0124] 3. Obtained from the preset role permission association table, the permission ID associated with the role ID of 3 is 1;
[0125] 4. The authorization ID with authorization ID 1 obtained from the preset authorization table is App\Http\Controllers\ProductController@view;
[0126] 5. Obtain the routing ID corresponding to the edit request: App\Http\Controllers\ProductController@edit, and compare it with the permission ID obtained in the previous step. If it is different, the permission authentication fails and the edit request is not processed.
Example Embodiment
[0127] Embodiment three:
[0128] If the operation request is a delete request, add a custom permission judgment unit to the controller for the operation request for deleting a product. If the price is greater than 10,000, it is judged whether there is a custom_high_price_product_delete permission label among the obtained M permission labels.
[0129] Specifically, the steps for determining the authority of Zhang San and Li Si are as follows:
[0130] Assuming that Zhang San has logged in and entered the URL for deleting the product, such as http: / / www.example.com / product / delete / 1, the permission judgment steps are as follows:
[0131] 1. Get the user ID of Zhang San as 1.
[0132] 2. The role ID associated with user ID 1 is obtained from the preset user role association table as 1.
[0133] 3. Obtained from the preset role permission association table, the permission IDs associated with the role ID of 1 are 1, 2, 3, 4.
[0134] 4. Obtained from the preset permission surface, the permissi...
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.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap