Пример #1
0
        public IHttpActionResult logInUser(JObject userInfo)
        {
            User user       = new JavaScriptSerializer().Deserialize <User>(userInfo.ToString());
            User userLogged = userManager.LogIn(user);

            if (userLogged != null)
            {
                return(Ok(userLogged));
            }
            else
            {
                return(BadRequest());
            }
        }