public Task <HttpResponseMessage> GenerateTokenRecoveryPassword([FromBody] dynamic body) { var user = _service.GetOneByEmail((string)body.headers.email); if (user != null) { var token = _service.GenerateTokenRecoveryPassword(user.Email); _service.SendEmailRecoveryPassword(user.Id, token); return(CreateResponse(HttpStatusCode.OK, user)); } else { return(CreateResponse(HttpStatusCode.NotFound, user)); } }