public override void  OnActionExecuting(ActionExecutingContext filterContext)
        {
            var requiresAuth = new RequiresAuthenticationAttribute(_useRewrite, _useReturnUrl);
            requiresAuth.OnActionExecuting(filterContext);
            if (filterContext.Result !=null)
                return;

            var user = filterContext.HttpContext.User;
            var controller = filterContext.RouteData.Values["controller"].ToString();

            if (!filterContext.IsChildAction && !Validate(user) && controller != "Auth" && controller != "Error")
            {
                filterContext.Result = new RewriteResult("~/Auth/Denied");
            }
        }
        public override void  OnActionExecuting(ActionExecutingContext filterContext)
        {
            var requiresAuth = new RequiresAuthenticationAttribute(_useRewrite, _useReturnUrl);

            requiresAuth.OnActionExecuting(filterContext);
            if (filterContext.Result != null)
            {
                return;
            }

            var user       = filterContext.HttpContext.User;
            var controller = filterContext.RouteData.Values["controller"].ToString();

            if (!filterContext.IsChildAction && !Validate(user) && controller != "Auth" && controller != "Error")
            {
                filterContext.Result = new RewriteResult("~/Auth/Denied");
            }
        }