namespace SIGCM2.Application.Audit;

/// Emits dbo.SecurityEvent rows for auth/authorization events (login, logout, refresh, permission.denied).
/// Separate from IAuditLogger because:
///   - Volume is ~100× higher than AuditEvent (retention 5y vs 10y).
///   - Invoked from infrastructure layers (auth handlers, middlewares) where no ambient
///     business transaction exists — not enlisted in TransactionScope.
///   - Schema includes Result/FailureReason/AttemptedUsername/SessionId specific to security events.
public interface ISecurityEventLogger
{
    Task LogAsync(
        string action,
        string result,
        int? actorUserId = null,
        string? attemptedUsername = null,
        Guid? sessionId = null,
        string? failureReason = null,
        object? metadata = null,
        CancellationToken ct = default);
}
