|
@@ -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()) |
|
|
{ |
|
|
{ |
|
|