Skip to content

ITenantsCheck Interface

Judges a list of tenants, whichever way it arrives: the tenants the settings declare at startup, and the list a change would leave.

C#
public interface ITenantsCheck

Derived
↳ ClientAssertionAudiencesCheck
↳ ClientIdsCheck
↳ ClientOfflineAccessCheck
↳ ClientSecretsCheck
↳ ClockSkewCeilingCheck
↳ CrossClientSubjectTokenExchangeCheck
↳ DefaultResourceIndicatorCheck
↳ ProfileServiceTokensCheck
↳ ProfileSigningKeysCheck
↳ RefreshTokenReusePolicyCheck
↳ ResourceDefinitionsCheck
↳ ServiceTokenEncryptionKeysCheck
↳ SecurityProfileCheck
↳ TenantDefinitionsCheck
↳ TenantKeysCheck
↳ PairwiseClientsCheck

Remarks

It names the tenants each refusal is about, so whoever asks can decide what a refusal costs: the settings refuse to start, while a list read from a store leaves the refused tenants out.

A list read from a store is judged at every reading, so a check runs once a period. One that throws instead of refusing fails the whole reading, and the server keeps serving the tenants it read last.

A check is handed only tenants holding a value wherever their types declare one: a tenant with a null there - a member, or an element of a collection, whose nullable annotation rules it out - is refused for it, and handed to the checks with the null mended so that it still claims its address and keys against the others; a check reads the definition as declared and guards against no such null.

The checks are built while the server's settings are validated, so a check asking a service that takes those settings resolves it when it judges a list rather than holding it from construction.

Methods

ITenantsCheck.Check(IReadOnlyCollection<TenantDefinition>, OidcOptions) Method

What is wrong with tenants, judged as the whole list the server would serve with the server's own settings options.

C#
System.Collections.Generic.IEnumerable<Abblix.Oidc.Server.Features.MultiTenancy.TenantRefusal> Check(System.Collections.Generic.IReadOnlyCollection<Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition> tenants, Abblix.Oidc.Server.Common.Configuration.OidcOptions options);

Parameters

tenants System.Collections.Generic.IReadOnlyCollection<TenantDefinition>
options OidcOptions

Returns

System.Collections.Generic.IEnumerable<TenantRefusal>

Remarks

The server's settings are handed in rather than read from the options pipeline, since the list the settings declare is judged while those very settings are being validated.