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

## IConsumedRequestUriRegistry Interface

Records the request URNs whose flow ended with a code or token, for as long as a page of that flow can still be
presented\.

```csharp
public interface IConsumedRequestUriRegistry
```

Derived  
↳ [ConsumedRequestUriRegistry](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.ConsumedRequestUriRegistry 'Abblix\.Oidc\.Server\.Features\.Storages\.ConsumedRequestUriRegistry')

### Remarks
Each page the end user is sent to stores the request under a URN of its own, and a refresh of the page makes
another; consuming the URN a code came by leaves the others\. The record is what refuses them: each of them carries
the URN its flow began with\.
### Methods

## IConsumedRequestUriRegistry\.IsConsumedAsync\(TenantDefinition, Uri\) Method {#Abblix.Oidc.Server.Features.Storages.IConsumedRequestUriRegistry.IsConsumedAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,System.Uri)}

Whether the flow begun with [requestUri](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.IConsumedRequestUriRegistry#Abblix.Oidc.Server.Features.Storages.IConsumedRequestUriRegistry.IsConsumedAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,System.Uri).requestUri 'Abblix\.Oidc\.Server\.Features\.Storages\.IConsumedRequestUriRegistry\.IsConsumedAsync\(Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition, System\.Uri\)\.requestUri') has ended\.

```csharp
System.Threading.Tasks.Task<bool> IsConsumedAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant, System.Uri requestUri);
```
#### Parameters

###### `tenant` [TenantDefinition](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition') {#Abblix.Oidc.Server.Features.Storages.IConsumedRequestUriRegistry.IsConsumedAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,System.Uri).tenant}

The tenant the request URI belongs to\.

###### `requestUri` [System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri') {#Abblix.Oidc.Server.Features.Storages.IConsumedRequestUriRegistry.IsConsumedAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,System.Uri).requestUri}

The URN the flow began with\.

#### 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\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')

## IConsumedRequestUriRegistry\.TryConsumeAsync\(TenantDefinition, Uri, DateTimeOffset\) Method {#Abblix.Oidc.Server.Features.Storages.IConsumedRequestUriRegistry.TryConsumeAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,System.Uri,System.DateTimeOffset)}

Ends the flow begun with [requestUri](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.IConsumedRequestUriRegistry#Abblix.Oidc.Server.Features.Storages.IConsumedRequestUriRegistry.TryConsumeAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,System.Uri,System.DateTimeOffset).requestUri 'Abblix\.Oidc\.Server\.Features\.Storages\.IConsumedRequestUriRegistry\.TryConsumeAsync\(Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition, System\.Uri, System\.DateTimeOffset\)\.requestUri'), answering whether this call is the one that ended it\.
The entity storage decides between two pages of one flow ending it together, one being told it did: the
default storage decides within one process only, and across several nodes only an `IEntityStorage`
built on the store's own primitive, such as Redis `SET NX` or a unique\-key insert, decides\.

```csharp
System.Threading.Tasks.Task<bool> TryConsumeAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant, System.Uri requestUri, System.DateTimeOffset expiresAt);
```
#### Parameters

###### `tenant` [TenantDefinition](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition') {#Abblix.Oidc.Server.Features.Storages.IConsumedRequestUriRegistry.TryConsumeAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,System.Uri,System.DateTimeOffset).tenant}

The tenant the request URI belongs to\.

###### `requestUri` [System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri') {#Abblix.Oidc.Server.Features.Storages.IConsumedRequestUriRegistry.TryConsumeAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,System.Uri,System.DateTimeOffset).requestUri}

The URN the flow began with\.

###### `expiresAt` [System\.DateTimeOffset](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset 'System\.DateTimeOffset') {#Abblix.Oidc.Server.Features.Storages.IConsumedRequestUriRegistry.TryConsumeAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,System.Uri,System.DateTimeOffset).expiresAt}

When no page of the flow can be presented any more\.

#### 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\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
`true` when the flow had not ended and this call ended it; `false` when it had ended
            already\.
