Пример #1
0
        public ActionResult Signin([FromBody] LoginBindModel model)
        {
            var oper = operatorService.GetByCredentials(model.Email, model.Password);

            if (oper == null)
            {
                return(NotFound());
            }

            var tokenString = BuildToken(oper);

            return(Ok(new { Token = tokenString, oper.FirstName }));
        }