#### [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')

## TenantKeysCheck Class

Refuses a tenant declaring keys the library's key provider never reads; with the keys coming from each tenant's
settings, a tenant declaring no signing key, a key lacking a member its type requires, or a key another tenant
declares; and, with the keys held by a custodian, whether or not a key provider of the host's own stands in front
of the library's, a tenant naming no key there or one another tenant names\.

```csharp
public sealed class TenantKeysCheck : Abblix.Oidc.Server.Features.MultiTenancy.ITenantsCheck
```

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

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

## TenantKeysCheck\(IServiceProvider\) Constructor {#Abblix.Oidc.Server.Features.MultiTenancy.TenantKeysCheck.TenantKeysCheck(System.IServiceProvider)}

Refuses a tenant declaring keys the library's key provider never reads; with the keys coming from each tenant's
settings, a tenant declaring no signing key, a key lacking a member its type requires, or a key another tenant
declares; and, with the keys held by a custodian, whether or not a key provider of the host's own stands in front
of the library's, a tenant naming no key there or one another tenant names\.

```csharp
public TenantKeysCheck(System.IServiceProvider serviceProvider);
```
#### Parameters

###### `serviceProvider` [System\.IServiceProvider](https://learn.microsoft.com/en-us/dotnet/api/system.iserviceprovider 'System\.IServiceProvider') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantKeysCheck.TenantKeysCheck(System.IServiceProvider).serviceProvider}

Tells which key provider serves the keys, and resolves the custodian\.
### Methods

## TenantKeysCheck\.Check\(IReadOnlyCollection\<TenantDefinition\>, OidcOptions\) Method {#Abblix.Oidc.Server.Features.MultiTenancy.TenantKeysCheck.Check(System.Collections.Generic.IReadOnlyCollection_Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition_,Abblix.Oidc.Server.Common.Configuration.OidcOptions)}

What is wrong with [tenants](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantKeysCheck#Abblix.Oidc.Server.Features.MultiTenancy.TenantKeysCheck.Check(System.Collections.Generic.IReadOnlyCollection_Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition_,Abblix.Oidc.Server.Common.Configuration.OidcOptions).tenants 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantKeysCheck\.Check\(System\.Collections\.Generic\.IReadOnlyCollection\<Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition\>, Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions\)\.tenants'), judged as the whole list the server would serve with the
server's own settings [options](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantKeysCheck#Abblix.Oidc.Server.Features.MultiTenancy.TenantKeysCheck.Check(System.Collections.Generic.IReadOnlyCollection_Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition_,Abblix.Oidc.Server.Common.Configuration.OidcOptions).options 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantKeysCheck\.Check\(System\.Collections\.Generic\.IReadOnlyCollection\<Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition\>, Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions\)\.options')\.

```csharp
public 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&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlycollection-1 'System\.Collections\.Generic\.IReadOnlyCollection\`1')[TenantDefinition](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlycollection-1 'System\.Collections\.Generic\.IReadOnlyCollection\`1') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantKeysCheck.Check(System.Collections.Generic.IReadOnlyCollection_Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition_,Abblix.Oidc.Server.Common.Configuration.OidcOptions).tenants}

###### `options` [OidcOptions](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantKeysCheck.Check(System.Collections.Generic.IReadOnlyCollection_Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition_,Abblix.Oidc.Server.Common.Configuration.OidcOptions).options}

Implements [Check\(IReadOnlyCollection&lt;TenantDefinition&gt;, OidcOptions\)](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.ITenantsCheck#Abblix.Oidc.Server.Features.MultiTenancy.ITenantsCheck.Check(System.Collections.Generic.IReadOnlyCollection_Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition_,Abblix.Oidc.Server.Common.Configuration.OidcOptions) 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.ITenantsCheck\.Check\(System\.Collections\.Generic\.IReadOnlyCollection\<Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition\>, Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions\)')

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

### 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\.
