2016-07-08 11:28:38 +08:00
|
|
|
|
using System.Web.Mvc;
|
2016-07-08 18:51:48 +08:00
|
|
|
|
using OpenAuth.App;
|
2016-07-08 11:28:38 +08:00
|
|
|
|
using OpenAuth.App.SSO;
|
|
|
|
|
|
|
|
|
|
namespace OpenAuth.WebTest.Controllers
|
|
|
|
|
{
|
|
|
|
|
public class HomeController :Controller
|
|
|
|
|
{
|
2016-07-08 18:51:48 +08:00
|
|
|
|
|
2016-07-08 11:28:38 +08:00
|
|
|
|
[SSOAuth]
|
|
|
|
|
public ActionResult Index()
|
|
|
|
|
{
|
2016-07-08 18:51:48 +08:00
|
|
|
|
var currentUser = AuthUtil.GetCurrentUser();
|
|
|
|
|
ViewBag.CurrentUser = currentUser;
|
2016-07-08 11:28:38 +08:00
|
|
|
|
return View();
|
|
|
|
|
}
|
2016-07-08 18:51:48 +08:00
|
|
|
|
|
|
|
|
|
public ActionResult Admin()
|
|
|
|
|
{
|
|
|
|
|
return Redirect("http://localhost:56813?token=" + Request.Cookies["Token"].Value);
|
|
|
|
|
}
|
2016-07-08 11:28:38 +08:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|