Sfoglia il codice sorgente

统一认证修改

和田中职
dao 2 settimane fa
parent
commit
7d4c0910f0
1 ha cambiato i file con 8 aggiunte e 2 eliminazioni
  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 Vedi File

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


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


Caricamento…
Annulla
Salva