zoukankan      html  css  js  c++  java
  • MVC 授权过滤器 AuthorizeAttribute

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Mvc;
    
    namespace 过滤器.Filtes
    {
        /// <summary>
        /// 授权过滤器,在Action过滤器之前执行
        /// </summary>
        public class MyAuthorizeAttribute : AuthorizeAttribute
        {
            /// <summary>
            /// MVC自己的授权方法
            /// </summary>
            /// <param name="filterContext"></param>
            public override void OnAuthorization(AuthorizationContext filterContext)
            {
                // base.OnAuthorization(filterContext);asp.net 的授权机制
            }
        }
    }
  • 相关阅读:
    Android
    Android
    Android
    Android
    Android
    Android
    Android
    Android
    Android
    Android
  • 原文地址:https://www.cnblogs.com/sumg/p/3744058.html
Copyright © 2011-2022 走看看