TenantResolverMiddlewareExtensions

Extensions related to TenantResolverMiddleware.

Namespace:
Inetdev.AspNetCore.Multitenancy
Type:
Class
Public:
Yes
Protected:
No
Sealed:
Yes
Abstract:
Yes
Inherits from:
System.Object

Methods

UseTenantNameUrlRewriter

Adds a rewriter middleware that strip the tenant name from the Path.

Signature:
public IApplicationBuilder UseTenantNameUrlRewriter<TTenant>(builder)
Returns

The application builder.

Parameters
Name Type Summary
builder IApplicationBuilder Application builder.

UseTenantResolver

Adds a tenant resolver middleware that looks the current tenant from the Uri.

It handle the requet with a StatusCode = 400 if not tenant is found unless that a tenant not found notification handles the request.

The default tenant provider does not filter un-provisioned tenants it is up to the application to verify this if required.

Signature:
public IApplicationBuilder UseTenantResolver<TTenant>(builder, options)
Returns

The application builder.

Parameters
Name Type Summary
builder IApplicationBuilder Application builder.
options TenantResolverOptions Options to pass to the middleware.
Exceptions
Type Summary
ArgumentNullException Thrown when options is null.