public IActionResult Login([FromBody] UsuarioDto usuarioDto)
        {
            var user = _userService.Autenticar(usuarioDto.Usuario, usuarioDto.Senha);

            if (user == null)
            {
                return(Ok(new { message = "Usuario ou senha esta incorreta", Erro = true }));
            }

            var tokenHandler    = new JwtSecurityTokenHandler();
            var key             = Encoding.ASCII.GetBytes(_appSettings.Secret);
            var tokenDescriptor = new SecurityTokenDescriptor
            {
                Subject = new ClaimsIdentity(new[]
                {
                    new Claim(ClaimTypes.Name, user.Id.ToString())
                }),
                Expires            = DateTime.UtcNow.AddHours(1),
                SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature)
            };
            var token       = tokenHandler.CreateToken(tokenDescriptor);
            var tokenString = tokenHandler.WriteToken(token);

            return(Ok(new
            {
                Id = user.Id,
                Username = user.Usuario,
                FirstName = user.Nome,
                Token = tokenString,
                Erro = false
            }));
        }