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

## TenantKeyRingOpening Class

Opens the part of the key ring each tenant signs with when the server mints its keys, minting its first key, so a
tenant the store gains while the server runs has a key from its first request\.

```csharp
public sealed class TenantKeyRingOpening : Abblix.Oidc.Server.Features.MultiTenancy.ITenantOpening
```

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

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

### Remarks
Which keys the server signs with is decided where the host places them, so it is read when tenants are opened
rather than at registration; keys from the settings or a custodian need no opening\.
### Constructors

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

Opens the part of the key ring each tenant signs with when the server mints its keys, minting its first key, so a
tenant the store gains while the server runs has a key from its first request\.

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

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

### Remarks
Which keys the server signs with is decided where the host places them, so it is read when tenants are opened
rather than at registration; keys from the settings or a custodian need no opening\.
### Methods

## TenantKeyRingOpening\.OpenAsync\(IReadOnlyCollection\<TenantDefinition\>, CancellationToken\) Method {#Abblix.Oidc.Server.Features.MultiTenancy.TenantKeyRingOpening.OpenAsync(System.Collections.Generic.IReadOnlyCollection_Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition_,System.Threading.CancellationToken)}

Readies [tenants](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantKeyRingOpening#Abblix.Oidc.Server.Features.MultiTenancy.TenantKeyRingOpening.OpenAsync(System.Collections.Generic.IReadOnlyCollection_Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition_,System.Threading.CancellationToken).tenants 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantKeyRingOpening\.OpenAsync\(System\.Collections\.Generic\.IReadOnlyCollection\<Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition\>, System\.Threading\.CancellationToken\)\.tenants') to be served, each one on its own, so one that fails leaves the others
ready\.

```csharp
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<string,System.Exception>> OpenAsync(System.Collections.Generic.IReadOnlyCollection<Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition> tenants, System.Threading.CancellationToken cancellationToken);
```
#### 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.TenantKeyRingOpening.OpenAsync(System.Collections.Generic.IReadOnlyCollection_Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition_,System.Threading.CancellationToken).tenants}

The tenants about to be served for the first time\.

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantKeyRingOpening.OpenAsync(System.Collections.Generic.IReadOnlyCollection_Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition_,System.Threading.CancellationToken).cancellationToken}

Cancels the opening\.

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

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[System\.Collections\.Generic\.IReadOnlyDictionary&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2 'System\.Collections\.Generic\.IReadOnlyDictionary\`2')[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')[,](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2 'System\.Collections\.Generic\.IReadOnlyDictionary\`2')[System\.Exception](https://learn.microsoft.com/en-us/dotnet/api/system.exception 'System\.Exception')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2 'System\.Collections\.Generic\.IReadOnlyDictionary\`2')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
Why each tenant that could not be readied was not, by its id; the others are ready\.
