Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

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 verification codes are large and the authority judgment is easily missed by providing a user authority verification method and device

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

Embodiment 1

[0114] For the operation request is a view request, assuming that Wang Wu has logged in, and Wang Wu’s view request is detected, and he enters the URL to view the product, such as http: / / www.example.com / product / view / 1, and performs the following permission judgments in turn step:

[0115] 1. Obtained Wangwu user ID is 3;

[0116] 2. Get the role ID 3 associated with the user ID 3 from the preset user role association table;

[0117] 3. Obtain the permission ID 1 associated with the role ID 3 from the preset role permission association table;

[0118] 4. Obtain the permission ID of 1 from the preset permission table as App\Http\Controllers\ProductController@view;

[0119] 5. Obtain the routing ID corresponding to the viewing request: App\Http\Controllers\ProductController@view, which is the same as the authorization ID obtained in the previous step, and enter the controller that processes the viewing request. There is no custom permission judgment unit in the controller used...

Embodiment 2

[0121] For the operation request is a view request, assuming that Wang Wu has logged in and entered the website for editing the product, such as http: / / www.example.com / product / edit / 1, the following permission judgment steps are performed in sequence:

[0122] 1. Obtained Wangwu user ID is 3;

[0123] 2. Get the role ID 3 associated with the user ID 3 from the preset user role association table;

[0124] 3. Obtain the permission ID 1 associated with the role ID 3 from the preset role permission association table;

[0125] 4. Obtain the permission ID of 1 from the preset permission table as App\Http\Controllers\ProductController@view;

[0126] 5. Obtain the routing ID corresponding to the editing request: App\Http\Controllers\ProductController@edit, compare it with the permission ID obtained in the previous step, if it is different, the permission authentication will fail, and the editing request will not be processed.

Embodiment 3

[0128] If the operation request is a delete request, add a custom permission judgment unit in the controller of the operation request for deleting a product. If the price is greater than 10,000, then judge whether there is a custom_high_price_product_delete permission identifier among the obtained M permission identifiers.

[0129] Specifically, the steps to determine the permissions of Zhang San and Li Si are as follows:

[0130] Assuming that Zhang San has logged in and entered the website to delete the product, such as http: / / www.example.com / product / delete / 1, the steps to determine the authority are as follows:

[0131] 1. The user ID of Zhang San is 1.

[0132] 2. Obtain the role ID associated with user ID 1 from the default user role association table.

[0133] 3. Obtain the permission IDs associated with role ID 1 from the preset role permission association table as 1, 2, 3, and 4.

[0134] 4. Obtained from the preset permission surface, the permission IDs of 1, 2, 3 a...

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
Features
  • Generate Ideas
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More