public JsonResult Authenticate(string token, bool createPersistentCookie) { SSO.Client.References.SSOPartnerServiceClient client = new SSO.Client.References.SSOPartnerServiceClient("partnerEndpoint"); SSO.Client.References.SSOUser user = client.ValidateToken(token); if (string.IsNullOrEmpty(user.Username) || Guid.Empty.Equals(user.SessionToken)) { return Json(new { result = "DENIED" }); } this.FormsService.SignIn(user.Username, true); Session[Miaow.function.Helper.SessionNameLogin] = ""; return Json(new { result = "SUCCESS" }); }
public JsonResult Authenticate(string token, bool createPersistentCookie) { SSO.Client.References.SSOPartnerServiceClient client = new SSO.Client.References.SSOPartnerServiceClient("partnerEndpoint"); SSO.Client.References.SSOUser user = client.ValidateToken(token); if (string.IsNullOrEmpty(user.Username) || Guid.Empty.Equals(user.SessionToken)) { return(Json(new { result = "DENIED" })); } this.FormsService.SignIn(user.Username, true); Session[iPow.function.Helper.SessionNameLogin] = ""; return(Json(new { result = "SUCCESS" })); }