ASP.Net MVC中自定义授权过滤器在软件系统中的应用  被引量:2

Application of ASP.Net MVC custom authorization filter in software system

在线阅读下载全文

作  者:毕传林[1] 裴南平 

机构地区:[1]九江职业技术学院,江西九江332007

出  处:《信息通信》2017年第12期136-138,共3页Information & Communications

基  金:2016年度江西省教育厅科学技术研究项目编号:GJJ161346<高职ASP.NET(C#)课程"全真"项目化教学模式的研究与实践>

摘  要:MVC是当前广泛使用一种软件开发模式。将应用程序分为三个主要的组件:Modal(模型),View(视图)和Controller(控制器),Modal用来存放数据和操作数据,View用来设计用户界面,Control用来接收和处理用户请求,并和模型和视图建立联系,其中控制器是核心。控制器中可以定义一些动作(Action)来处理用户的请求,在动作前可添加自定义授权过滤器来验证用户请求的合法性。通过定义以AuthorizeAttribute为父类的子类,来设计授权规则。用户登录时,根据用户的登录身份信息给用户进行授权,如果授权失败,则用户不能执行后续的操作,从而达到强制用户登录的目的。MVC is a widely used software development model.The application is divided into three major components: Modal(model),View(view) and Controller(controller),Modal is used to store data and manipulate data. View is used to design user interfaces, and Control is used to receive and process user requests, and it builds relationships with models and Views.A number of actions can be defined in the controller(Action) to handle user requests.A custom authorization filter can be added before the action to validate the validity of the user request.By defining a subclass of Authorize Attribute design authoriddddzation rules.When a user logs in, the user is authorized. If the authorization fails, the user cannot perform subsequent operations..The user must log in before he can operate it.

关 键 词:MVC 路由 控制器 动作 授权过滤器 

分 类 号:TP311.5[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象