mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-12-27 06:35:39 +08:00
routine update
This commit is contained in:
@@ -1,20 +1,23 @@
|
||||
using System.Web.Mvc;
|
||||
using System.Configuration;
|
||||
using System.Web.Mvc;
|
||||
using OpenAuth.App.SSO;
|
||||
|
||||
namespace OpenAuth.WebTest.Controllers
|
||||
{
|
||||
public class LoginController : Controller
|
||||
{
|
||||
private string _appKey = ConfigurationManager.AppSettings["SSOAppKey"];
|
||||
// GET: Login
|
||||
public ActionResult Index()
|
||||
{
|
||||
ViewBag.AppKey = _appKey;
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult Index(string username, string password)
|
||||
{
|
||||
var result = AuthUtil.Login("openauth", username, password);
|
||||
var result = AuthUtil.Login(_appKey, username, password);
|
||||
if (result.Success)
|
||||
return Redirect("/home/index?Token=" + result.Token);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user