This commit is contained in:
2026-06-02 15:46:13 +02:00
25 changed files with 951 additions and 215 deletions
+7
View File
@@ -6,6 +6,13 @@ public class AppUser
public string Email { get; set; } = string.Empty;
public string DisplayName { get; set; } = string.Empty;
public UserRole Role { get; set; } = UserRole.TechN0;
/// <summary>Identity source. Entra = OIDC-provisioned, Local = password-based account.</summary>
public AuthProvider Provider { get; set; } = AuthProvider.Entra;
/// <summary>PasswordHasher output. Only set for <see cref="AuthProvider.Local"/> users.</summary>
public string? PasswordHash { get; set; }
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
public DateTimeOffset? LastLogin { get; set; }
}
+9
View File
@@ -0,0 +1,9 @@
namespace SharepointToolbox.Web.Core.Models;
public enum AuthProvider
{
/// <summary>Microsoft Entra (OIDC) — auto-provisioned on login.</summary>
Entra = 0,
/// <summary>Local password account — created by an Admin.</summary>
Local = 1
}