Exemplo n.º 1
0
 public JsonResult DeauthenticateUser(string SessionGuid)
 {
     try
     {
         DbHelpers.RemoveSession(SessionGuid);
         return(Json(
                    new JsonResponse <Boolean> {
             Response = true, Success = true, Message = "This device has been deauthenticated."
         },
                    JsonRequestBehavior.AllowGet
                    ));
     }
     catch (Exception)
     {
         return(Json(
                    new JsonResponse <Boolean> {
             Response = false, Success = false, Message = "An error occured while processing your request."
         },
                    JsonRequestBehavior.AllowGet
                    ));
     }
 }
Exemplo n.º 2
0
 public JsonResult ClearSessions(int SessionId)
 {
     DbHelpers.RemoveSession(SessionId);
     return(Json(true, JsonRequestBehavior.AllowGet));
 }