.NET API
TraconTenancyBuilderExtensions
Tracon.AspNetCore.dllExtensions that connect multi-tenancy to the HTTP request.
public static class TraconTenancyBuilderExtensionsInheritance
Section titled “Inheritance”object ← TraconTenancyBuilderExtensions
Inherited Members
Section titled “Inherited Members”object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Methods
Section titled “Methods”UseTenancy(ITraconBuilder, Action<TraconTenancyOptions>)
Section titled “ UseTenancy(ITraconBuilder, Action<TraconTenancyOptions>)”Resolves the tenant from the current HTTP request. If not called, Tracon runs single-tenant and no extra configuration is needed.
public static ITraconBuilder UseTenancy(this ITraconBuilder builder, Action<TraconTenancyOptions> configure)Parameters
Section titled “Parameters”builder ITraconBuilder
The Tracon configuration chain.
configure Action<TraconTenancyOptions>
The resolution settings.
Returns
Section titled “Returns”The builder, for chaining.
Remarks
Section titled “Remarks”The claim is preferred as the tenant source; the header path must be opened explicitly and, because it can be spoofed, should only be used inside a trusted network. Details: TraconTenancyOptions.
builder.AddTracon() .UseOpenAI(apiKey) .UsePostgreSql(connectionString) .UseTenancy(options => { options.Enabled = true; options.ClaimType = "tenant_id"; });Exceptions
Section titled “Exceptions”A dependency is null.