public string Post([FromBody] DtoUser dtoUser)
 {
     dtoUser.Password = EncryptSha256.Encrypt(dtoUser.Password);
     _useCaseUser.Create(dtoUser.DtoToDomainEntity());
     return("Created");
 }
 public string Put(int id, [FromBody] DtoUser dtoUser)
 {
     dtoUser.Password = EncryptSha256.Encrypt(dtoUser.Password);
     _useCaseUser.Update(id, dtoUser.DtoToDomainEntity());
     return("Updated");
 }
        public IActionResult Login([FromBody] DtoUserAuth userAuth)
        {
            DomainEntityUser domainEntity = _useCaseLogin.FindUserForLogin(userAuth.Username, EncryptSha256.Encrypt(userAuth.Password));

            if (domainEntity != null)
            {
                _jwt.AddToken(userAuth);
                return(new OkObjectResult(userAuth));
            }
            return(new BadRequestResult());
        }