dao hace 3 semanas
padre
commit
d3b0737874
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  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 Ver fichero

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


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

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

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


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




Cargando…
Cancelar
Guardar