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

## IBackChannelRequestStorage Interface

Defines the contract for a storage system responsible for persisting and retrieving
backchannel authentication requests in the context of Client\-Initiated Backchannel Authentication \(CIBA\)\.

```csharp
public interface IBackChannelRequestStorage
```

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

## IBackChannelRequestStorage\.StoreAsync\(BackChannelAuthenticationRequest, TimeSpan\) Method {#Abblix.Oidc.Server.Features.BackChannelAuthentication.Interfaces.IBackChannelRequestStorage.StoreAsync(Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest,System.TimeSpan)}

Asynchronously stores a backchannel authentication request in the storage system\.
This method saves the provided authentication request and sets its expiration based on the specified duration\.

```csharp
System.Threading.Tasks.Task<string> StoreAsync(Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest authenticationRequest, System.TimeSpan expiresIn);
```
#### Parameters

###### `authenticationRequest` [BackChannelAuthenticationRequest](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest 'Abblix\.Oidc\.Server\.Features\.BackChannelAuthentication\.BackChannelAuthenticationRequest') {#Abblix.Oidc.Server.Features.BackChannelAuthentication.Interfaces.IBackChannelRequestStorage.StoreAsync(Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest,System.TimeSpan).authenticationRequest}

The backchannel authentication request to store\.

###### `expiresIn` [System\.TimeSpan](https://learn.microsoft.com/en-us/dotnet/api/system.timespan 'System\.TimeSpan') {#Abblix.Oidc.Server.Features.BackChannelAuthentication.Interfaces.IBackChannelRequestStorage.StoreAsync(Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest,System.TimeSpan).expiresIn}

The duration after which the stored request will expire\.

#### 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\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
A task that returns the ID of the stored authentication request\.

## IBackChannelRequestStorage\.TryGetAsync\(string\) Method {#Abblix.Oidc.Server.Features.BackChannelAuthentication.Interfaces.IBackChannelRequestStorage.TryGetAsync(string)}

Tries to retrieve a backchannel authentication request by its unique identifier\.
This method checks if a request exists for the specified ID and returns it if found\.

```csharp
System.Threading.Tasks.Task<Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest?> TryGetAsync(string authenticationRequestId);
```
#### Parameters

###### `authenticationRequestId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.BackChannelAuthentication.Interfaces.IBackChannelRequestStorage.TryGetAsync(string).authenticationRequestId}

The unique identifier of the authentication request to retrieve\.

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[BackChannelAuthenticationRequest](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest 'Abblix\.Oidc\.Server\.Features\.BackChannelAuthentication\.BackChannelAuthenticationRequest')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
A task that returns the authentication request if found;
otherwise, null\.

## IBackChannelRequestStorage\.TryRemoveAsync\(string\) Method {#Abblix.Oidc.Server.Features.BackChannelAuthentication.Interfaces.IBackChannelRequestStorage.TryRemoveAsync(string)}

Claims a backchannel authentication request, retrieving and removing it in one protocol, so that a
caller told it took the request is the only caller that can be told so\. It narrows the window in
which two polls both retrieve one request rather than closing it; the returns block below says
what the claim covers and what it does not\.

```csharp
System.Threading.Tasks.Task<Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest?> TryRemoveAsync(string authenticationRequestId);
```
#### Parameters

###### `authenticationRequestId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.BackChannelAuthentication.Interfaces.IBackChannelRequestStorage.TryRemoveAsync(string).authenticationRequestId}

The unique identifier of the authentication request to remove\.

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[BackChannelAuthenticationRequest](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest 'Abblix\.Oidc\.Server\.Features\.BackChannelAuthentication\.BackChannelAuthenticationRequest')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
A task that returns the authentication request when this caller removed it and still held its own
claim afterwards\. Null otherwise, which covers the request not being there, another caller having
taken it, and a claim that expired mid\-protocol \- the last on one caller with nobody to lose to,
and its outcome is the request gone with nobody able to be told they took it\. A store call that
fails after the removal raises instead of answering\.

## IBackChannelRequestStorage\.UpdateAsync\(string, BackChannelAuthenticationRequest, TimeSpan\) Method {#Abblix.Oidc.Server.Features.BackChannelAuthentication.Interfaces.IBackChannelRequestStorage.UpdateAsync(string,Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest,System.TimeSpan)}

Updates an existing backchannel authentication request in storage\.
Used in ping mode to update request status when user completes authentication\.

```csharp
System.Threading.Tasks.Task UpdateAsync(string requestId, Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest request, System.TimeSpan expiresIn);
```
#### Parameters

###### `requestId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.BackChannelAuthentication.Interfaces.IBackChannelRequestStorage.UpdateAsync(string,Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest,System.TimeSpan).requestId}

The unique identifier of the authentication request to update\.

###### `request` [BackChannelAuthenticationRequest](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest 'Abblix\.Oidc\.Server\.Features\.BackChannelAuthentication\.BackChannelAuthenticationRequest') {#Abblix.Oidc.Server.Features.BackChannelAuthentication.Interfaces.IBackChannelRequestStorage.UpdateAsync(string,Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest,System.TimeSpan).request}

The updated authentication request data\.

###### `expiresIn` [System\.TimeSpan](https://learn.microsoft.com/en-us/dotnet/api/system.timespan 'System\.TimeSpan') {#Abblix.Oidc.Server.Features.BackChannelAuthentication.Interfaces.IBackChannelRequestStorage.UpdateAsync(string,Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest,System.TimeSpan).expiresIn}

The duration after which the request expires\.

#### Returns
[System\.Threading\.Tasks\.Task](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task 'System\.Threading\.Tasks\.Task')  
A task that completes when the request is updated in storage\.
