mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-11-10 19:34:45 +08:00
去掉Owin的一些代码
This commit is contained in:
35
OpenAuth.Mvc/Controllers/BaseController.cs
Normal file
35
OpenAuth.Mvc/Controllers/BaseController.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
// ***********************************************************************
|
||||
// Assembly : OpenAuth.Mvc
|
||||
// Author : Administrator
|
||||
// Created : 09-22-2015
|
||||
//
|
||||
// Last Modified By : Administrator
|
||||
// Last Modified On : 09-22-2015
|
||||
// ***********************************************************************
|
||||
// <copyright file="BaseController.cs" company="">
|
||||
// Copyright (c) . All rights reserved.
|
||||
// </copyright>
|
||||
// <summary>基础控制器,设置权限</summary>
|
||||
// ***********************************************************************
|
||||
|
||||
using System.Web.Mvc;
|
||||
using Infrastructure.Helper;
|
||||
using OpenAuth.Domain;
|
||||
|
||||
namespace OpenAuth.Mvc.Controllers
|
||||
{
|
||||
public class BaseController : Controller
|
||||
{
|
||||
protected override void OnActionExecuting(ActionExecutingContext filterContext)
|
||||
{
|
||||
base.OnActionExecuting(filterContext);
|
||||
|
||||
#region 当Session过期自动跳出登录画面
|
||||
if (SessionHelper.GetSessionUser<User>() == null)
|
||||
{
|
||||
Response.Redirect("~/Account/Login");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user