Namespace JD.AI.Core.MultiTenancy
Classes
- HeaderTenantResolver
Resolves tenant from the
X-Tenant-Idrequest header. Falls back to a default tenant when no header is present.
- TenantContext
Holds the current tenant identity for the request scope. Flows through DI as a scoped service.
- TenantDataFilter
Provides tenant-scoped data filtering. Services use this to ensure queries only return data belonging to the current tenant.
- TenantInfo
Resolved tenant information.
- TenantQuota
Per-tenant resource quotas and rate limits. Tracks usage per tenant within a configurable time window.
- TenantQuotaConfig
Configuration for per-tenant quotas.
- TenantResolutionContext
Input context for tenant resolution, abstracted from HTTP specifics so the resolver can be used in non-HTTP contexts (CLI, daemon).
- TenantUsageStats
Current usage stats for a tenant.
Interfaces
- ITenantResolver
Resolves the current tenant from request context (header, token claim, API key, etc.). Implementations are used by middleware to populate TenantContext.
Enums
- QuotaExceededAction
Action taken when a tenant exceeds a quota.