AgentPrismTenancyBuilderExtensions
AgentPrism.AspNetCore.dllExtensions that connect multi-tenancy to the HTTP request.
public static class AgentPrismTenancyBuilderExtensionsInheritance
Section titled “Inheritance”object ← AgentPrismTenancyBuilderExtensions
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(IAgentPrismBuilder, Action<AgentPrismTenancyOptions>)
Section titled “ UseTenancy(IAgentPrismBuilder, Action<AgentPrismTenancyOptions>)”Resolves the tenant from the current HTTP request. If not called, AgentPrism runs single-tenant and no extra configuration is needed.
public static IAgentPrismBuilder UseTenancy(this IAgentPrismBuilder builder, Action<AgentPrismTenancyOptions> configure)Parameters
Section titled “Parameters”builder IAgentPrismBuilder
The AgentPrism configuration chain.
configure Action<AgentPrismTenancyOptions>
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: AgentPrismTenancyOptions.
builder.AddAgentPrism() .UseOpenAI(apiKey) .UsePostgreSql(connectionString) .UseTenancy(options => { options.Enabled = true; options.ClaimType = "tenant_id"; });Exceptions
Section titled “Exceptions”A dependency is null.