mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-11-08 10:24:44 +08:00
check some bugs
This commit is contained in:
@@ -16,6 +16,9 @@ namespace OpenAuth.WebTest.Controllers
|
||||
return View();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 跳转到后台管理页面
|
||||
/// </summary>
|
||||
public ActionResult Admin()
|
||||
{
|
||||
return Redirect(ConfigurationManager.AppSettings["OpenAuthURL"] + "?token=" + Request.Cookies["Token"].Value);
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc;
|
||||
using OpenAuth.App.SSO;
|
||||
|
||||
namespace OpenAuth.WebTest.Controllers
|
||||
@@ -18,12 +14,12 @@ namespace OpenAuth.WebTest.Controllers
|
||||
[HttpPost]
|
||||
public ActionResult Index(string username, string password)
|
||||
{
|
||||
var token = AuthUtil.Login("670b14728ad9902aecba32e22fa4f6bd", username, password);
|
||||
if (!string.IsNullOrEmpty(token))
|
||||
return Redirect("/home/index?Token=" + token);
|
||||
var result = AuthUtil.Login("670b14728ad9902aecba32e22fa4f6bd", username, password);
|
||||
if (result.Success)
|
||||
return Redirect("/home/index?Token=" + result.Token);
|
||||
else
|
||||
{
|
||||
return View();
|
||||
return View(result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user