瀏覽代碼

和田中职
dao 1 周之前
父節點
當前提交
d3b0737874
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. +6
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs

+ 6
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs 查看文件

@@ -26,6 +26,7 @@ using Learun.Application.TwoDevelopment.PersonnelManagement;
using Learun.Application.TwoDevelopment.Permission;
using DotNetCasClient;
using DotNetCasClient.Configuration;
using Learun.Loger;

namespace Learun.Application.Web.Controllers
{
@@ -196,9 +197,10 @@ namespace Learun.Application.Web.Controllers
public ActionResult Index()
{
#region CAS
if (User.Identity.IsAuthenticated)
{

string uid = User.Identity.Name; // 获取用户ID
if (!string.IsNullOrEmpty(uid))
{
@@ -227,6 +229,7 @@ namespace Learun.Application.Web.Controllers
return Fail("系统无此用户,请先同步用户数据!");
}
}

CasAuthentication.RedirectToLoginPage();
//LogHelper.WriteToLog("cas登录", $"无登录信息{Request.UrlReferrer}");
//LogHelper.WriteToLog("cas登录", $"信息{User.Identity.Name}");
@@ -272,6 +275,7 @@ namespace Learun.Application.Web.Controllers
////Response.Redirect(loginUrl);
//return Redirect(loginUrl);
#endregion
#region

//string ticket = Request.QueryString["ticket"];
//string serviceUrl = DotNetCasClient.Configuration.CasClientConfiguration.CAS_SERVER_LOGIN_URL;
@@ -389,6 +393,7 @@ namespace Learun.Application.Web.Controllers
// default:
// return View("Default"); // 经典版本
//}
#endregion
return Fail("userinfo is null");
}



Loading…
取消
儲存