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.

Active Publication Date: 2017-05-31
WUHAN DOUYU NETWORK TECH CO LTD
View PDF5 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The embodiment of the present invention solves the technical problems in the prior art that the user authority verific

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • User authority authentication method and apparatus
  • User authority authentication method and apparatus
  • User authority authentication method and apparatus

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a user authority authentication method and apparatus, applied to the field of the Internet. The method comprises the following steps: when an operation request of an operation user of a current login authority verification system, obtaining M authority identifiers associated with the user ID of the operation user, wherein the operation request is used for operating data in a target database; obtaining a routing identifier corresponding to the operation request; judging whether an identifier the same as the routing identifier exists in the M authority identifiers; and if the identifier the same as the routing identifier exists in the M authority identifiers, entering a controller for processing the operation request. By adoption of the user authority authentication method and apparatus disclosed by the invention, the amount of codes for user authority judgment is reduced, authority judgment leakage is avoided, and thus the accuracy and the execution efficiency of the user authority authentication are improved.

Description

technical field [0001] The invention relates to the field of the Internet, in particular to a user authority verification method and device. Background technique [0002] The database organizes, stores and manages the data warehouse according to the data structure. Users can view, add, update, delete and other operations on the data in the warehouse. Different login users need to set different permissions to operate the database. Some users are set to only perform viewing operations, while some users are set to view, add, and update operations. [0003] In the prior art, in order to allow different users to have different operation permissions on the same database, the permissions are judged in each controller, for example, the permission judgment is set in the view controller. Specifically, it is judged whether the user who currently executes the view operation has the view permission, and the permission judgment is set in the delete controller to judge whether the user wh...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): H04L29/06H04L9/32G06F21/62
CPCG06F21/6218G06F2221/2141H04L9/32H04L63/08
Inventor 张利平
Owner WUHAN DOUYU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products