Add ApplicationUser, DapperUserStore, Argon2PasswordHasher scaffolding

Unwired Identity store/hasher adapters, ahead of wiring them into DI.
This commit is contained in:
Aaron Po
2026-08-22 01:23:47 -04:00
parent b61a440994
commit 1a7267ca4a
3 changed files with 421 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
namespace Features.Auth.Identity;
/// <summary>
/// The user type driving <see cref="Microsoft.AspNetCore.Identity.UserManager{TUser}" /> for
/// Features.Auth. A plain POCO (not <c>IdentityUser&lt;TKey&gt;</c>) backed by <see cref="DapperUserStore" />
/// rather than EF Core, matching the rest of the solution's Dapper-only persistence.
/// </summary>
public sealed class ApplicationUser
{
public Guid Id { get; set; }
public string UserName { get; set; } = string.Empty;
public string? NormalizedUserName { get; set; }
public string Email { get; set; } = string.Empty;
public string? NormalizedEmail { get; set; }
public bool EmailConfirmed { get; set; }
public string? PasswordHash { get; set; }
public string FirstName { get; set; } = string.Empty;
public string LastName { get; set; } = string.Empty;
public DateTime DateOfBirth { get; set; }
}