Table of Contents

Interface IBackChannelAuthenticationRequestStore

Namespace
Fdyay.IdentityServer.Stores
Assembly
Fdyay.IdentityServer.Core.dll

Stores pending backchannel authentication requests, reachable by the client's auth_req_id and by the internal id the approval surface uses (OpenID Connect CIBA Core 1.0).

public interface IBackChannelAuthenticationRequestStore

Remarks

Separate from IPersistedGrantStore for the reason IDeviceFlowStore is: that store finds a grant by one key, and this one has to answer to two — the client polls with the handle it was issued, and the user answers a request they reached from a list.

It also has to answer a question no other store here is asked: what is waiting for this person. A CIBA request arrives with nobody in front of it, so the only way it ever reaches a human is a surface that can enumerate what is pending for them — which is why FindPendingForSubjectAsync(string, CancellationToken) is on the interface rather than being something the approval page keeps its own index for.

Methods

FindByAuthenticationRequestIdAsync(string, CancellationToken)

Finds the request a client is polling for.

Task<BackChannelAuthenticationRequest?> FindByAuthenticationRequestIdAsync(string authenticationRequestId, CancellationToken cancellationToken = default)

Parameters

authenticationRequestId string
cancellationToken CancellationToken

Returns

Task<BackChannelAuthenticationRequest>

FindByInternalIdAsync(string, CancellationToken)

Finds the request the approval surface is acting on.

Task<BackChannelAuthenticationRequest?> FindByInternalIdAsync(string internalId, CancellationToken cancellationToken = default)

Parameters

internalId string
cancellationToken CancellationToken

Returns

Task<BackChannelAuthenticationRequest>

FindPendingForSubjectAsync(string, CancellationToken)

The requests still waiting on an answer from this subject.

Task<IReadOnlyCollection<BackChannelAuthenticationRequest>> FindPendingForSubjectAsync(string subjectId, CancellationToken cancellationToken = default)

Parameters

subjectId string
cancellationToken CancellationToken

Returns

Task<IReadOnlyCollection<BackChannelAuthenticationRequest>>

RemoveByInternalIdAsync(string, CancellationToken)

Removes a request under both keys.

Task RemoveByInternalIdAsync(string internalId, CancellationToken cancellationToken = default)

Parameters

internalId string
cancellationToken CancellationToken

Returns

Task

StoreAsync(string, BackChannelAuthenticationRequest, CancellationToken)

Stores a new request under both keys.

Task StoreAsync(string authenticationRequestId, BackChannelAuthenticationRequest request, CancellationToken cancellationToken = default)

Parameters

authenticationRequestId string
request BackChannelAuthenticationRequest
cancellationToken CancellationToken

Returns

Task

UpdateByInternalIdAsync(string, BackChannelAuthenticationRequest, CancellationToken)

Replaces a request, by the key the approval surface holds.

Task UpdateByInternalIdAsync(string internalId, BackChannelAuthenticationRequest request, CancellationToken cancellationToken = default)

Parameters

internalId string
request BackChannelAuthenticationRequest
cancellationToken CancellationToken

Returns

Task