Correction PDF

This commit is contained in:
2025-09-16 22:20:21 +02:00
parent d9fca86145
commit 41bd8254e7
17 changed files with 591 additions and 110 deletions

View File

@@ -104,5 +104,15 @@ namespace administration.Controllers
return Content("✅ Mot de passe mis à jour avec succès");
}
[HttpGet("/tools/hash")]
[Authorize] // et/ou protège par un flag d'env
public IActionResult HashTool(string username, string password, [FromServices] IPasswordHasher<User> hasher)
{
if (string.IsNullOrWhiteSpace(username) || string.IsNullOrWhiteSpace(password)) return BadRequest("username/password requis");
var hash = hasher.HashPassword(new User { Username = username }, password);
return Content(hash);
}
}
}