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

@@ -1,15 +1,24 @@
using System.Web.Mvc;
using OpenAuth.App;
using OpenAuth.App.SSO;
namespace OpenAuth.WebTest.Controllers
{
public class HomeController :Controller
{
[SSOAuth]
public ActionResult Index()
{
var currentUser = AuthUtil.GetCurrentUser();
ViewBag.CurrentUser = currentUser;
return View();
}
public ActionResult Admin()
{
return Redirect("http://localhost:56813?token=" + Request.Cookies["Token"].Value);
}
}
}