Skip to content

TenantAddress Class

Where a tenant is served: the host and path of its issuer.

C#
public sealed record TenantAddress : System.IEquatable<Abblix.Oidc.Server.Features.MultiTenancy.TenantAddress>

Inheritance System.Object → TenantAddress

Implements System.IEquatable<TenantAddress>

Remarks

Scheme and port are left out: behind a proxy the request carries its own, and two issuers differing in nothing else could not be told apart by a request.

Constructors

TenantAddress(string, string) Constructor

Where a tenant is served: the host and path of its issuer.

C#
public TenantAddress(string Host, string Path);

Parameters

Host System.String

The issuer's host, as Normalize(string) leaves it.

Path System.String

The issuer's path without a trailing slash; empty for an issuer at the root of its host.

Remarks

Scheme and port are left out: behind a proxy the request carries its own, and two issuers differing in nothing else could not be told apart by a request.

Properties

TenantAddress.Host Property

The issuer's host, as Normalize(string) leaves it.

C#
public string Host { get; init; }

Property Value

System.String

TenantAddress.Path Property

The issuer's path without a trailing slash; empty for an issuer at the root of its host.

C#
public string Path { get; init; }

Property Value

System.String

Methods

TenantAddress.AllOf(TenantDefinition) Method

Every address tenant is served at: its issuer's, and its mutual-TLS host under the issuer's path when it declares one.

C#
public static System.Collections.Generic.IEnumerable<Abblix.Oidc.Server.Features.MultiTenancy.TenantAddress> AllOf(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant);

Parameters

tenant TenantDefinition

Returns

System.Collections.Generic.IEnumerable<TenantAddress>

TenantAddress.Canonical() Method

This address with its path in the form it is compared in, so two addresses no request can tell apart are equal.

C#
public Abblix.Oidc.Server.Features.MultiTenancy.TenantAddress Canonical();

Returns

TenantAddress

TenantAddress.CanonicalPath(string) Method

path with every encoded slash in one case, the form both an issuer's path and a request path are compared in: RFC 3986 section 2.1 makes the case of an escape insignificant, and the server keeps an encoded slash as the client wrote it.

C#
public static string CanonicalPath(string path);

Parameters

path System.String

Returns

System.String

Remarks

Used to compare, never to address: an encoded slash in the addresses built from a request stays as the client wrote it, since a client assertion's audience is compared with them exactly. The length never changes, so a position found in this form is the same position in the original.

TenantAddress.Covers(string) Method

Whether path is this address's path or goes on below it, compared by whole segments: /tenants/acme covers /tenants/acme/connect/token and not /tenants/acme2.

C#
public bool Covers(string path);

Parameters

path System.String

Returns

System.Boolean

TenantAddress.Of(Uri) Method

The address issuer names.

C#
public static Abblix.Oidc.Server.Features.MultiTenancy.TenantAddress Of(System.Uri issuer);

Parameters

issuer System.Uri

Returns

TenantAddress

Remarks

The host is taken with the brackets an IPv6 address keeps in a Host header, and the path decoded as the server decodes a request path - every escape except an encoded slash, which would otherwise split a segment - since that is the form each is compared with.