Exemple #1
0
        public Guid DoLogin([FromBody] UserCredential credential)
        {
            Logger.LogDebug($"User '{credential.userName}' tries to login.");
            Guid sessionId = _loginManager.DoLogin(credential.userName, credential.password);

            return(sessionId);
        }
        public ActionResult Login(string employeeId, string password)
        {
            OrganizationInformation organization = new OrganizationInformation();

            var msg = _iLoginManager.DoLogin(employeeId, password);

            if (msg.MessageType == MessageTypes.Success)
            {
                CreateSession(employeeId);
            }
            else
            {
                Session["Session"] = null;
            }

            return(Json(msg, JsonRequestBehavior.AllowGet));
        }