コード例 #1
0
ファイル: AccountController.cs プロジェクト: JPomichael/Miaow
 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" });
 }
コード例 #2
0
 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" }));
 }