1 check issue #12

2 修改登录为Identity认证方式
This commit is contained in:
yubaolee
2016-04-21 10:54:05 +08:00
parent 9c8b6f8629
commit 2d13810c82
14 changed files with 233 additions and 140 deletions

View File

@@ -24,6 +24,7 @@ using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Web.Mvc;
using OpenAuth.App;
namespace OpenAuth.Mvc.Controllers
{
@@ -33,8 +34,8 @@ namespace OpenAuth.Mvc.Controllers
protected override void OnActionExecuting(ActionExecutingContext filterContext)
{
var loginUser = SessionHelper.GetSessionUser<LoginUserVM>();
if (loginUser == null)
var loginUser = AutofacExt.GetFromFac<LoginApp>().GetLoginUser();
if (!User.Identity.IsAuthenticated)
{
filterContext.Result = new RedirectResult("/Login/Index");
return;