v1.2版,全面实现SSO登陆

This commit is contained in:
yubaolee
2016-07-08 18:51:48 +08:00
parent 032bc20e1e
commit 781ae8900d
19 changed files with 326 additions and 147 deletions

View File

@@ -24,21 +24,20 @@ using System.Reflection;
using System.Web;
using System.Web.Mvc;
using OpenAuth.App;
using OpenAuth.App.SSO;
namespace OpenAuth.Mvc.Controllers
{
public class BaseController : Controller
public class BaseController : SSOController
{
protected BjuiResponse BjuiResponse = new BjuiResponse();
protected override void OnActionExecuting(ActionExecutingContext filterContext)
{
base.OnActionExecuting(filterContext);
var loginUser = AutofacExt.GetFromFac<LoginApp>().GetLoginUser();
if (!User.Identity.IsAuthenticated)
{
filterContext.Result = new RedirectResult("/Login/Index");
return;
}
var controllername = Request.RequestContext.RouteData.Values["controller"].ToString().ToLower();
var actionname = filterContext.ActionDescriptor.ActionName.ToLower();
@@ -69,7 +68,6 @@ namespace OpenAuth.Mvc.Controllers
}
}
base.OnActionExecuting(filterContext);
}
}
}