ITenantCatalog Interface
Finds the tenants a deployment serves.
public interface ITenantCatalogDerived
↳ StoreTenantCatalog
Remarks
Asked on every request, so an implementation answers from memory where it can.
What is built from a tenant's definition - its scopes, resources, pairwise converter and clients - is kept for the tenant and built again once the definition hands out other objects for them. So a catalog answers with the same objects until the definition really changes: one building a fresh definition for every lookup has all of them rebuilt on every request. With the server's own catalog (StoreTenantCatalog) what was built from a tenant's definition in force - the one it serves now, or the last one it served - is not replaced from another, so a request still holding one it replaced is answered with what was built; with any other catalog, one wrapping the server's own included, such a request builds them back from the definition it holds. The checks of the tenant list judge what the server's own catalog reads, so a catalog of the host's own gets none of them, while one wrapping the server's passes on only what they let through.
Likewise only the server's own catalog readies a tenant before serving it (ITenantOpening), and a server minting its keys keeps a key only for the tenants that catalog serves. So a catalog of the host's own answers with no tenant the server's catalog does not serve, or every request to that tenant needing a key fails, the key ring keeping no partition for it.
The server uses the definition it is handed, so a catalog of the host's own answers with the definition in force, and the host enters a tenant scope with the definition in force too.
Methods
ITenantCatalog.FindByAddressAsync(string, string, CancellationToken) Method
The tenant served at host and path: the one whose issuer names that host and, among those, the longest whole-segment start of the path; null when no issuer covers it.
System.Threading.Tasks.ValueTask<Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition?> FindByAddressAsync(string host, string path, System.Threading.CancellationToken cancellationToken);Parameters
host System.String
path System.String
cancellationToken System.Threading.CancellationToken
Returns
System.Threading.Tasks.ValueTask<TenantDefinition>
ITenantCatalog.FindByIdAsync(string, CancellationToken) Method
The tenant registered under tenantId, compared exactly, or null when there is none.
System.Threading.Tasks.ValueTask<Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition?> FindByIdAsync(string tenantId, System.Threading.CancellationToken cancellationToken);