#### [Abblix\.Oidc\.Server](https://www.abblix.com/docs/api/abblix-oidc-server 'index')
### [Abblix\.Oidc\.Server\.Features\.MultiTenancy](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy 'Abblix\.Oidc\.Server\.Features\.MultiTenancy')

## TenantDefinition Class

A tenant this deployment serves\.

```csharp
public sealed class TenantDefinition
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → TenantDefinition
### Properties

## TenantDefinition\.AccountSelectionUri Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.AccountSelectionUri}

The page a user picks an account on, when they hold several and have to choose the one to sign in with\. A
relative address is a page under this tenant's issuer\.

```csharp
public System.Uri? AccountSelectionUri { get; init; }
```

#### Property Value
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')

## TenantDefinition\.Clients Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.Clients}

The clients registered with this tenant\. A client is known only at the tenant that lists it, or at which it
was registered dynamically, so two tenants may each register a client under the same id\.

```csharp
public System.Collections.Generic.IEnumerable<Abblix.Oidc.Server.Features.ClientInformation.ClientInfo> Clients { get; init; }
```

#### Property Value
[System\.Collections\.Generic\.IEnumerable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')[ClientInfo](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientInformation.ClientInfo 'Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')

## TenantDefinition\.ClientSecretEncryption Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.ClientSecretEncryption}

The key the client secrets this tenant issues on dynamic registration are also kept encrypted with, so a client
reading its registration at the client configuration endpoint \(RFC 7592 section 3\) is given its secret back\.

```csharp
public Abblix.Oidc.Server.Features.ClientInformation.ClientSecretEncryptionSettings? ClientSecretEncryption { get; init; }
```

#### Property Value
[ClientSecretEncryptionSettings](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientInformation.ClientSecretEncryptionSettings 'Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientSecretEncryptionSettings')

### Remarks
Required while the server serves dynamic client registration: a tenant without it stops the server at startup
when declared in the settings, and is refused, not served, when read from a store of tenants\. Null otherwise\.

## TenantDefinition\.ConsentUri Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.ConsentUri}

The page a user gives consent on, when a client requests access to their data\. A relative address is a page
under this tenant's issuer\.

```csharp
public System.Uri? ConsentUri { get; init; }
```

#### Property Value
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')

## TenantDefinition\.CustodianKeys Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.CustodianKeys}

The custodian's keys this tenant produces with, when the server keeps its keys in a custodian: each tenant
names keys of its own there, as it declares its own [SigningKeys](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.SigningKeys 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition\.SigningKeys') otherwise\.

```csharp
public Abblix.Jwt.ExternalKeys.CustodianHeldKeys? CustodianKeys { get; init; }
```

#### Property Value
[CustodianHeldKeys](https://www.abblix.com/docs/api/abblix-jwt/Abblix.Jwt.ExternalKeys.CustodianHeldKeys 'Abblix\.Jwt\.ExternalKeys\.CustodianHeldKeys')

## TenantDefinition\.DefaultResourceIndicator Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.DefaultResourceIndicator}

The resource an access token is minted for when the request names none and none is inferred from its scopes
\([InferResourceFromScope](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.InferResourceFromScope 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition\.InferResourceFromScope')\)\. Left null, the token's `aud` falls back to the issuer\.

```csharp
public System.Uri? DefaultResourceIndicator { get; init; }
```

#### Property Value
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')

### Remarks
RFC 9068 Section 3 requires an authorization server to "use a default resource indicator in the \`aud\`
claim" when a request carries no `resource` parameter, and Section 4 tells a resource server to reject a
token whose `aud` does not name it, so a tenant with one API says so here once, instead of teaching every
client to send `resource`\. The value is read by every resource server of the tenant, so changing it is a
change to their contract\. It must be an absolute URI naming one of this tenant's [Resources](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.Resources 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition\.Resources') \-
the tenant is refused otherwise, since a token minted for a resource it does not know is one nobody can
accept\.

## TenantDefinition\.DefaultSecurityProfile Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.DefaultSecurityProfile}

The security profile this tenant holds EVERY client to, whatever [SecurityProfile](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientInformation.ClientInfo#Abblix.Oidc.Server.Features.ClientInformation.ClientInfo.SecurityProfile 'Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo\.SecurityProfile')
each one names for itself: a floor rather than a default, so a client can ask for more and no registration
can take it out from under what is set here\. The default [None](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ClientSecurityProfile#Abblix.Oidc.Server.Common.Constants.ClientSecurityProfile.None 'Abblix\.Oidc\.Server\.Common\.Constants\.ClientSecurityProfile\.None') demands
nothing, leaving each client governed by what it names for itself\.

```csharp
public Abblix.Oidc.Server.Common.Constants.ClientSecurityProfile DefaultSecurityProfile { get; init; }
```

#### Property Value
[ClientSecurityProfile](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ClientSecurityProfile 'Abblix\.Oidc\.Server\.Common\.Constants\.ClientSecurityProfile')

## TenantDefinition\.EncryptionKeys Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.EncryptionKeys}

The keys clients encrypt to this tenant with, when the keys come from each tenant's settings\. Each tenant
keeps its own, so what a client encrypts to one tenant no other can read\.

```csharp
public System.Collections.Generic.IReadOnlyCollection<Abblix.Jwt.JsonWebKey> EncryptionKeys { get; init; }
```

#### Property Value
[System\.Collections\.Generic\.IReadOnlyCollection&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlycollection-1 'System\.Collections\.Generic\.IReadOnlyCollection\`1')[JsonWebKey](https://www.abblix.com/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlycollection-1 'System\.Collections\.Generic\.IReadOnlyCollection\`1')

## TenantDefinition\.Generation Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.Generation}

Which creation of the tenant under [Id](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.Id 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition\.Id') this is, assigned each time a tenant is created \-
by [ITenantManager](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.ITenantManager 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.ITenantManager'), or by the store of a host writing it otherwise \- and kept for as long as it
lives: ASCII letters, digits, '\-' and '\_'\. Empty for a tenant the settings declare\.

```csharp
public string Generation { get; init; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

### Remarks
What the server keeps for a tenant \- its stored codes and tokens, its minted keys, what it builds from the
definition \- is kept under its id and generation together, so a tenant created again under the id of one
removed starts with none of it\.

## TenantDefinition\.Id Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.Id}

The identifier the tenant is registered under: ASCII letters, digits, '\-' and '\_'\.

```csharp
public string Id { get; init; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

### Remarks
It stands in the names the tenant's data, keys and check\-session cookie are kept under, so a tenant whose id
holds anything else is refused wherever the server takes it in\.

## TenantDefinition\.InferResourceFromScope Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.InferResourceFromScope}

Whether a request naming no resource is taken to be for the one of this tenant's [Resources](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.Resources 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition\.Resources')
whose definition declares a requested scope\.

```csharp
public bool InferResourceFromScope { get; init; }
```

#### Property Value
[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')

### Remarks
RFC 9068 section 3 says an authorization server SHOULD infer the default resource indicator from the
`scope` parameter, and SHOULD reject with `invalid_scope` a request whose scopes refer to different
resources; both happen only when this is set, because the inferred resource becomes the `aud` every
resource server reads\. The audience is then the resource the request names, else the one its scopes refer
to, else [DefaultResourceIndicator](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.DefaultResourceIndicator 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition\.DefaultResourceIndicator'), else the issuer\. At the token endpoint it is inferred only
for a grant the token request itself authorizes and only when the request names no `audience`; a code,
a refresh token, a device code or a back\-channel request carries the audience its authorization settled\.

## TenantDefinition\.InteractionUri Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.InteractionUri}

The page the end user completes a step of the host's own on, such as accepting a new version of the terms,
when [IUserInteractionRequirement](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.UserInteraction.IUserInteractionRequirement 'Abblix\.Oidc\.Server\.Features\.UserInteraction\.IUserInteractionRequirement') requires one before anything is issued\. A
relative address is a page under this tenant's issuer\.

```csharp
public System.Uri? InteractionUri { get; init; }
```

#### Property Value
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')

## TenantDefinition\.Issuer Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.Issuer}

The tenant's issuer identifier, as it appears in every token the tenant issues and in its discovery
document \- and the address the tenant is served at\.

```csharp
public System.Uri Issuer { get; init; }
```

#### Property Value
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')

### Remarks
A request belongs to the tenant whose issuer names its host and the longest start of its path, so the
host and path of the address the discovery document is fetched from are the issuer's, as OpenID Connect
Discovery 1\.0 section 4\.3 requires: `https://acme.example.com` serves a whole host,
`https://auth.example.com/tenants/acme` a path on a shared one\. Scheme and port are not compared,
since behind a proxy the request carries its own; the host's forwarded\-headers setup decides those\.

The issuer is judged as the server's own is: an https URL with no query, fragment, user name or password,
written with no whitespace and well formed, http only when
[AllowHttpIssuer](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions#Abblix.Oidc.Server.Common.Configuration.OidcOptions.AllowHttpIssuer 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions\.AllowHttpIssuer') lets it through. It is written into tokens and
discovery as configured, through [System\.Uri\.OriginalString](https://learn.microsoft.com/en-us/dotnet/api/system.uri.originalstring 'System\.Uri\.OriginalString').

## TenantDefinition\.LoginUri Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.LoginUri}

The page a user signs in on\. A relative address is a page under this tenant's issuer\.

```csharp
public System.Uri? LoginUri { get; init; }
```

#### Property Value
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')

## TenantDefinition\.LogoutConfirmationUri Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.LogoutConfirmationUri}

The page the end user is asked on whether to log out, when a logout request does not show that it belongs to
their current session \(OpenID Connect RP\-Initiated Logout 1\.0 section 2\)\. A relative address is a page under
this tenant's issuer\.

```csharp
public System.Uri? LogoutConfirmationUri { get; init; }
```

#### Property Value
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')

### Remarks
The end\-session endpoint redirects the user agent there with the parameters of the logout request and
`confirmation`, the value the server issued for the question\. When the end user agrees, the page sends
all of them back to the end\-session endpoint, with GET or POST; the value is good for one use and for
[LogoutConfirmationLifetime](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions#Abblix.Oidc.Server.Common.Configuration.OidcOptions.LogoutConfirmationLifetime 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions\.LogoutConfirmationLifetime')\. When the end user declines, the page
does not send them to the `post_logout_redirect_uri` its query carries: only the end\-session endpoint
checks that address against the client's registration \(RP\-Initiated Logout 1\.0 section 3\)\. The page's address
carries the hint and the issued value, so the page sends no referrer and loads nothing from another origin\. Left unset, the endpoint answers such
a request with the `confirmation_required` error and the value in its body, for a host that asks the
question through an end\-session response formatter of its own\.

## TenantDefinition\.MtlsBaseUri Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.MtlsBaseUri}

The scheme, host and port this tenant's mutual\-TLS endpoint aliases \(RFC 8705 section 5\) are served at\. The
aliases keep the tenant's issuer path, so a request to this host under that path is the tenant's as a request to the issuer's host is;
the address therefore carries no path of its own\.

```csharp
public System.Uri? MtlsBaseUri { get; init; }
```

#### Property Value
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')

### Remarks
The server publishes an alias at this address for each mutual\-TLS endpoint its discovery document names, so
none while endpoint paths are hidden from discovery, and names no alias of any other kind: a request reaches a
tenant only at its issuer and at this address, so an alias anywhere else would send a client where no request
reaches the tenant\.

## TenantDefinition\.PairwiseSubject Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.PairwiseSubject}

The key sealing this tenant's pairwise subject identifiers, or null when its clients take public ones only\.
Each tenant keeps its own, so the pseudonyms two tenants give one user cannot be matched to each other\.

```csharp
public Abblix.Oidc.Server.Features.PairwiseIdentifiers.PairwiseSubjectSettings? PairwiseSubject { get; init; }
```

#### Property Value
[PairwiseSubjectSettings](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.PairwiseIdentifiers.PairwiseSubjectSettings 'Abblix\.Oidc\.Server\.Features\.PairwiseIdentifiers\.PairwiseSubjectSettings')

## TenantDefinition\.RegistrationUri Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.RegistrationUri}

The page a user creates an account on when a client requests registration with `prompt=create`
\(Initiating User Registration via OpenID Connect 1\.0\); left unset, [LoginUri](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.LoginUri 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition\.LoginUri') is used instead,
so a login page that also offers registration needs nothing more\. A relative address is a page under this
tenant's issuer\.

```csharp
public System.Uri? RegistrationUri { get; init; }
```

#### Property Value
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')

## TenantDefinition\.Resources Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.Resources}

The resources this tenant issues tokens for: what a client can request access to, and the audience a token
is restricted to \(RFC 8707\)\.

```csharp
public Abblix.Oidc.Server.Common.Constants.ResourceDefinition[]? Resources { get; init; }
```

#### Property Value
[ResourceDefinition](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ResourceDefinition 'Abblix\.Oidc\.Server\.Common\.Constants\.ResourceDefinition')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')

### Remarks
With none registered and no token exchange in use, a token's audience is the issuer\.

## TenantDefinition\.Scopes Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.Scopes}

The scopes this tenant defines beyond the standard ones, with the claim types each grants, which outline what
a client of this tenant can request access to\.

```csharp
public Abblix.Oidc.Server.Common.Constants.ScopeDefinition[]? Scopes { get; init; }
```

#### Property Value
[ScopeDefinition](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ScopeDefinition 'Abblix\.Oidc\.Server\.Common\.Constants\.ScopeDefinition')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')

## TenantDefinition\.SigningKeys Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.SigningKeys}

The keys this tenant signs its tokens with and publishes in its JWKS, when the keys come from each tenant's
settings\. Each tenant keeps its own, so a party trusting one tenant's keys cannot verify another tenant's
tokens\.

```csharp
public System.Collections.Generic.IReadOnlyCollection<Abblix.Jwt.JsonWebKey> SigningKeys { get; init; }
```

#### Property Value
[System\.Collections\.Generic\.IReadOnlyCollection&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlycollection-1 'System\.Collections\.Generic\.IReadOnlyCollection\`1')[JsonWebKey](https://www.abblix.com/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlycollection-1 'System\.Collections\.Generic\.IReadOnlyCollection\`1')

## TenantDefinition\.TlsClientAuthCertificateAuthorities Property {#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.TlsClientAuthCertificateAuthorities}

The certificates of the certificate authorities this tenant trusts to issue the certificates its
`tls_client_auth` clients authenticate with, each base64\-encoded DER, as the `x5c` member of a JWK
carries one \(RFC 7517 section 4\.7\)\. A self\-signed one is a trust anchor; any other is an intermediate
certificate a client certificate may chain through to one of the anchors listed beside it\.

```csharp
public System.Collections.Generic.IReadOnlyCollection<string> TlsClientAuthCertificateAuthorities { get; init; }
```

#### Property Value
[System\.Collections\.Generic\.IReadOnlyCollection&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlycollection-1 'System\.Collections\.Generic\.IReadOnlyCollection\`1')[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlycollection-1 'System\.Collections\.Generic\.IReadOnlyCollection\`1')

### Remarks
RFC 8705 section 2\.1 has the PKI method rely "on a validated certificate chain \[RFC5280\]", and section 7\.4 has
the authorization server "only accept, as trust anchors, a limited number of CAs whose certificate issuance
policy meets its security requirements"\. The chain is built against these authorities alone, and each tenant
keeps its own: an authority trusted by one tenant does
not vouch for a subject registered at another\. Only the client's own certificate reaches the server, so an
intermediate certificate between it and the anchor is listed here\. With none listed the tenant serves no
`tls_client_auth`: its discovery document does not name the method, registration refuses it, and a
client registered for it is refused\. Judged when the tenant enters the server, by the check of the tenant list\.
