namespace Management.Security; /// /// Request-scoped authentication context. /// Populated by ClientAuthMiddleware. /// public sealed class ClientContext { public string? SessionId { get; set; } public string? ClientId { get; set; } public string? PlatformClientId { get; set; } public string? ClientName { get; set; } public string? UserId { get; set; } public string? Email { get; set; } public string? Role { get; set; } public bool IsDevBypass { get; set; } public bool IsAuthenticated => !string.IsNullOrWhiteSpace(ClientId); public bool IsAdmin => string.Equals(Role, "Admin", StringComparison.OrdinalIgnoreCase); }