feat(cqrs): migrate Sites, Auth, Users, Cameras to CQRS

- Sites: CreateSite, UpdateSite, DeleteSite, GenerateToken commands + handlers
- Auth: Login, Register, RefreshToken, 2FA, ChangePassword, Logout commands
- Users: CRUD, roles, sites, lock/unlock, reset-password commands + queries
- Cameras: CRUD, SetCredentials commands + queries
- Add IApplicationDbContext abstraction for Clean Architecture
- Add ICredentialProtector, IJwtService interfaces to Application layer
- 0 build errors, 0 warnings
This commit is contained in:
Arnaud Dartois committed 2026-07-22 19:43:13 +00:00
1 parent 649af93f56
commit 11f7fd8d20
83 files changed
+1991 -21

No files matched your search

@@ -1,18 +1,9 @@
using System.Text;
using Heimdall.Application.Common;
using Microsoft.AspNetCore.DataProtection;
namespace Heimdall.Infrastructure.Security;
/// <summary>
/// Encrypts and decrypts camera credentials using ASP.NET Core Data Protection (IDataProtector).
/// Uses a dedicated purpose string to isolate camera credentials from other protected data.
/// </summary>
public interface ICredentialProtector
{
string Encrypt(string plaintext);
string Decrypt(string ciphertext);
}
public sealed class DataProtectorCredentialProtector : ICredentialProtector
{
private readonly IDataProtector _protector;