Exemplo n.º 1
0
        public IActionResult RequestToken([FromBody] LoginModel req)
        {
            try
            {
                ReturnLoginModel resp = _serviceCliente.Login(req);

                if (resp.Authorization)
                {
                    return(Ok(resp));
                }
                else
                {
                    return(Unauthorized(resp));
                }
            }
            catch (Exception e)
            {
                return(BadRequest(e));
            }
        }