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).
public interface IBackChannelRequestStorageDerived
↳ BackChannelRequestStorage
Methods
IBackChannelRequestStorage.StoreAsync(BackChannelAuthenticationRequest, TimeSpan) Method
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.
System.Threading.Tasks.Task<string> StoreAsync(Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest authenticationRequest, System.TimeSpan expiresIn);Parameters
authenticationRequest BackChannelAuthenticationRequest
The backchannel authentication request to store.
expiresIn System.TimeSpan
The duration after which the stored request will expire.
Returns
System.Threading.Tasks.Task<System.String>
A task that returns the ID of the stored authentication request.
IBackChannelRequestStorage.TryGetAsync(string) Method
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.
System.Threading.Tasks.Task<Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest?> TryGetAsync(string authenticationRequestId);Parameters
authenticationRequestId System.String
The unique identifier of the authentication request to retrieve.
Returns
System.Threading.Tasks.Task<BackChannelAuthenticationRequest>
A task that returns the authentication request if found;
otherwise, null.
IBackChannelRequestStorage.TryRemoveAsync(string) Method
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.
System.Threading.Tasks.Task<Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest?> TryRemoveAsync(string authenticationRequestId);Parameters
authenticationRequestId System.String
The unique identifier of the authentication request to remove.
Returns
System.Threading.Tasks.Task<BackChannelAuthenticationRequest>
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
Updates an existing backchannel authentication request in storage. Used in ping mode to update request status when user completes authentication.
System.Threading.Tasks.Task UpdateAsync(string requestId, Abblix.Oidc.Server.Features.BackChannelAuthentication.BackChannelAuthenticationRequest request, System.TimeSpan expiresIn);Parameters
requestId System.String
The unique identifier of the authentication request to update.
request BackChannelAuthenticationRequest
The updated authentication request data.
expiresIn System.TimeSpan
The duration after which the request expires.
Returns
System.Threading.Tasks.Task
A task that completes when the request is updated in storage.