Ejemplo n.º 1
0
 public ActionResult Login200(LoginVM loginPassword)
 {
     Response.AddHeader("Access-Control-Allow-Origin", "*");
     return Json(new
         {
             access_token = "alr9wUGYBf4783nJSByfb4"
         }, JsonRequestBehavior.AllowGet);
 }
Ejemplo n.º 2
0
 public ActionResult Login500(LoginVM loginPassword)
 {
     Response.AddHeader("Access-Control-Allow-Origin", "*");
     return Json(new
         {
             error = new
                 {
                     code = 500,
                     error_message = "Does not has all required fields"
                 }
         }, JsonRequestBehavior.AllowGet);
 }
Ejemplo n.º 3
0
        public ActionResult Login401(LoginVM loginPassword)
        {
            Response.AddHeader("Access-Control-Allow-Origin", "*");

            return Json(new
                {
                    error = new
                        {
                            code = 401,
                            error_message = "User unauthorized"
                        }
                }, JsonRequestBehavior.AllowGet);
        }