TenantAddress Class
Where a tenant is served: the host and path of its issuer.
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.
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.
public string Host { get; init; }Property Value
TenantAddress.Path Property
The issuer's path without a trailing slash; empty for an issuer at the root of its host.
public string Path { get; init; }Property Value
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.
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.
public Abblix.Oidc.Server.Features.MultiTenancy.TenantAddress Canonical();Returns
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.
public static string CanonicalPath(string path);Parameters
path System.String
Returns
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.
public bool Covers(string path);Parameters
path System.String
Returns
TenantAddress.Of(Uri) Method
The address issuer names.
public static Abblix.Oidc.Server.Features.MultiTenancy.TenantAddress Of(System.Uri issuer);Parameters
issuer System.Uri
Returns
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.