mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-05-12 16:50:39 +08:00
24 lines
534 B
C#
24 lines
534 B
C#
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);
|
|
}
|
|
|
|
}
|
|
} |