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

## IKeyRings Interface

The rings of every partition the key ring keeps \([IKeyRingPartitions](https://www.abblix.com/docs/api/abblix-jwt/Abblix.Jwt.ExternalKeys.IKeyRingPartitions 'Abblix\.Jwt\.ExternalKeys\.IKeyRingPartitions')\), one for each issuer a
server serves, so each issuer mints, rotates and serves keys of its own\.

```csharp
public interface IKeyRings
```
### Methods

## IKeyRings\.Close\(string\) Method {#Abblix.Jwt.ExternalKeys.IKeyRings.Close(string)}

Lets the ring of [partition](https://www.abblix.com/docs/api/abblix-jwt/Abblix.Jwt.ExternalKeys.IKeyRings#Abblix.Jwt.ExternalKeys.IKeyRings.Close(string).partition 'Abblix\.Jwt\.ExternalKeys\.IKeyRings\.Close\(string\)\.partition') go, its keys with it, once the issuer it served is gone for
good; a ring not built is left alone\. The partition's entries stay in the store\.

```csharp
void Close(string partition);
```
#### Parameters

###### `partition` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Jwt.ExternalKeys.IKeyRings.Close(string).partition}

The partition to close\.

## IKeyRings\.DeleteAsync\(IReadOnlyCollection\<string\>, CancellationToken\) Method {#Abblix.Jwt.ExternalKeys.IKeyRings.DeleteAsync(System.Collections.Generic.IReadOnlyCollection_string_,System.Threading.CancellationToken)}

Removes the entries of [partitions](https://www.abblix.com/docs/api/abblix-jwt/Abblix.Jwt.ExternalKeys.IKeyRings#Abblix.Jwt.ExternalKeys.IKeyRings.DeleteAsync(System.Collections.Generic.IReadOnlyCollection_string_,System.Threading.CancellationToken).partitions 'Abblix\.Jwt\.ExternalKeys\.IKeyRings\.DeleteAsync\(System\.Collections\.Generic\.IReadOnlyCollection\<string\>, System\.Threading\.CancellationToken\)\.partitions') from the store, each partition on its own\. Call it once
their rings are closed and nothing will verify a token their keys signed, since the keys are gone for every
instance sharing the store\. One read of the store serves them all\.

```csharp
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<string,System.Exception>> DeleteAsync(System.Collections.Generic.IReadOnlyCollection<string> partitions, System.Threading.CancellationToken cancellationToken);
```
#### Parameters

###### `partitions` [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') {#Abblix.Jwt.ExternalKeys.IKeyRings.DeleteAsync(System.Collections.Generic.IReadOnlyCollection_string_,System.Threading.CancellationToken).partitions}

The partitions whose entries to remove\.

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.Jwt.ExternalKeys.IKeyRings.DeleteAsync(System.Collections.Generic.IReadOnlyCollection_string_,System.Threading.CancellationToken).cancellationToken}

Cancels the removal; the entries not removed yet stay\.

#### 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 partition whose entries could not all be removed was not, by its name; the others are
            gone\.

## IKeyRings\.For\(string\) Method {#Abblix.Jwt.ExternalKeys.IKeyRings.For(string)}

The ring of [partition](https://www.abblix.com/docs/api/abblix-jwt/Abblix.Jwt.ExternalKeys.IKeyRings#Abblix.Jwt.ExternalKeys.IKeyRings.For(string).partition 'Abblix\.Jwt\.ExternalKeys\.IKeyRings\.For\(string\)\.partition')\.

```csharp
Abblix.Jwt.ExternalKeys.IKeyRing For(string partition);
```
#### Parameters

###### `partition` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Jwt.ExternalKeys.IKeyRings.For(string).partition}

A partition the ring keeps, or one opened by [OpenAsync\(IReadOnlyCollection&lt;string&gt;, CancellationToken\)](https://www.abblix.com/docs/api/abblix-jwt/Abblix.Jwt.ExternalKeys.IKeyRings#Abblix.Jwt.ExternalKeys.IKeyRings.OpenAsync(System.Collections.Generic.IReadOnlyCollection_string_,System.Threading.CancellationToken) 'Abblix\.Jwt\.ExternalKeys\.IKeyRings\.OpenAsync\(System\.Collections\.Generic\.IReadOnlyCollection\<string\>, System\.Threading\.CancellationToken\)')\.

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

#### Exceptions

[System\.InvalidOperationException](https://learn.microsoft.com/en-us/dotnet/api/system.invalidoperationexception 'System\.InvalidOperationException')  
The ring keeps no such partition\.

## IKeyRings\.OpenAsync\(IReadOnlyCollection\<string\>, CancellationToken\) Method {#Abblix.Jwt.ExternalKeys.IKeyRings.OpenAsync(System.Collections.Generic.IReadOnlyCollection_string_,System.Threading.CancellationToken)}

Readies the rings of [partitions](https://www.abblix.com/docs/api/abblix-jwt/Abblix.Jwt.ExternalKeys.IKeyRings#Abblix.Jwt.ExternalKeys.IKeyRings.OpenAsync(System.Collections.Generic.IReadOnlyCollection_string_,System.Threading.CancellationToken).partitions 'Abblix\.Jwt\.ExternalKeys\.IKeyRings\.OpenAsync\(System\.Collections\.Generic\.IReadOnlyCollection\<string\>, System\.Threading\.CancellationToken\)\.partitions') to serve, each on its own: builds each not built yet and
refreshes each not kept now, which mints a first key where none is due, so the first request for it finds a
key to produce with\. One read of the store serves them all\.

```csharp
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<string,System.Exception>> OpenAsync(System.Collections.Generic.IReadOnlyCollection<string> partitions, System.Threading.CancellationToken cancellationToken);
```
#### Parameters

###### `partitions` [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') {#Abblix.Jwt.ExternalKeys.IKeyRings.OpenAsync(System.Collections.Generic.IReadOnlyCollection_string_,System.Threading.CancellationToken).partitions}

The partitions to open, each named of letters, digits, '\-', '\_' and '~' only\.

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.Jwt.ExternalKeys.IKeyRings.OpenAsync(System.Collections.Generic.IReadOnlyCollection_string_,System.Threading.CancellationToken).cancellationToken}

Cancels the opening of those not opened yet\.

#### 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 partition that could not be opened was not, by its name: a name that cannot name a
            partition, or the store or the custodian failing\. The others are ready\.

#### Exceptions

[System\.InvalidOperationException](https://learn.microsoft.com/en-us/dotnet/api/system.invalidoperationexception 'System\.InvalidOperationException')  
Keys are adopted where no partition will take them, judged before
            any partition opens, so none of them is opened\.
