Merge pull request 'fix(auth): secure 2FA challenges and session revocation' (#5) from audit-auth-session into main

Validation intégrée avec profils/failover : Infrastructure 305/305 (dont upgrade/rollback migrations combinées), Application 504/504. Branche auth Web389/389 et PostgreSQL auth3/3 ; révocation abonnements inter-contextes11/11. Galerie #10 suit séparément.
This commit was merged in pull request #5.
This commit is contained in:
arnaud.dartois committed 2026-10-20 07:38:58 +02:00
commit 6b887d5fbf
51 files changed
+6714 -245

No files matched your search

@@ -85,17 +85,17 @@ public class AuthController : ControllerBase
[ProducesResponseType(typeof(void), StatusCodes.Status401Unauthorized)]
public async Task<IActionResult> Verify2fa([FromBody] Verify2faRequest request, CancellationToken ct)
{
_logger.LogInformation("2FA verification attempt for {Email}", request.Email);
var command = new Verify2faCommand(request.Email, request.Code);
_logger.LogInformation("2FA verification attempt");
var command = new Verify2faCommand(request.ChallengeId, request.Code);
var result = await _mediator.Send(command, ct);
if (result.IsSuccess)
{
_logger.LogInformation("2FA verification successful for {Email}", request.Email);
_logger.LogInformation("2FA verification successful");
return Ok(result.Data);
}
_logger.LogWarning("2FA verification failed for {Email}: {Error}", request.Email, result.Error);
_logger.LogWarning("2FA verification failed: {Error}", result.Error);
return StatusCode(result.StatusCode ?? 401, new { error = result.Error });
}