Selaa lähdekoodia

统一认证修改

和田中职
dao 6 päivää sitten
vanhempi
commit
7d4c0910f0
1 muutettua tiedostoa jossa 8 lisäystä ja 2 poistoa
  1. +8
    -2
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Hetian/HeTianApi.cs

+ 8
- 2
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Hetian/HeTianApi.cs Näytä tiedosto

@@ -51,19 +51,25 @@ namespace Learun.Application.WebApi.Modules.Hetian

private Response CheckTicket(dynamic _)
{
LoginModel loginModel = this.GetReqData<LoginModel>();
var loginModel1 = this.GetReqData();
var loginModel = loginModel1.ToObject<LoginModel>();
LogHelper.WriteToLog($"loginModel :{loginModel.ToJson()}");
var ticket = loginModel.ticket;
//var uid = "180018";
if (string.IsNullOrEmpty(ticket))
if (!string.IsNullOrEmpty(ticket))
{
string validationUrl = UrlUtil.ConstructValidateUrl(ticket, CasAuthentication.Gateway, CasAuthentication.Renew, new NameValueCollection());
LogHelper.WriteToLog($"validationUrl:{validationUrl}");
var a = PerformHttpGet(validationUrl, true);
LogHelper.WriteToLog($"a :{a}");
if (a.Contains("PerformHttpGet"))
{
return Fail("PerformHttpGet err");
}
var serviceResponse = ServiceResponse.ParseResponse(a);
LogHelper.WriteToLog($"serviceResponse:{serviceResponse.ToJson()}");
AuthenticationSuccess authSuccessResponse = (AuthenticationSuccess)serviceResponse.Item;
LogHelper.WriteToLog($"authSuccessResponse:{authSuccessResponse.ToJson()}");
var uid = authSuccessResponse.User;
if (!uid.IsNullOrWhiteSpace())
{


Ladataan…
Peruuta
Tallenna