Table of Contents

Interface IBackchannelAuthenticationInteractionService

Namespace
Fdyay.IdentityServer.Services
Assembly
Fdyay.IdentityServer.AspNetCore.dll

Surfaces pending backchannel requests to the UI, and records the user's answer.

public interface IBackchannelAuthenticationInteractionService

Remarks

The counterpart to IDeviceFlowInteractionService, and it differs in the one way the two flows differ. A device code is answered by whoever holds the code — the code is the proof, and any signed-in user may approve it. A backchannel request names its user before anyone is asked anything, so every member here takes the subject doing the answering and refuses a request belonging to somebody else.

That check is not defence in depth, it is the flow's integrity. Without it a client could name one user, and the request would be approvable by any other who reached the page — which would make "authenticate this person" mean "authenticate whoever answers".

Methods

CompleteRequestAsync(string, ConsentResponse, string, CancellationToken)

Records the user's decision. Returns false if the id no longer identifies a live request of theirs.

Task<bool> CompleteRequestAsync(string id, ConsentResponse consent, string subjectId, CancellationToken cancellationToken = default)

Parameters

id string
consent ConsentResponse
subjectId string
cancellationToken CancellationToken

Returns

Task<bool>

GetPendingRequestsAsync(string, CancellationToken)

The requests still waiting on an answer from this subject.

Task<IReadOnlyCollection<BackChannelAuthenticationRequestContext>> GetPendingRequestsAsync(string subjectId, CancellationToken cancellationToken = default)

Parameters

subjectId string
cancellationToken CancellationToken

Returns

Task<IReadOnlyCollection<BackChannelAuthenticationRequestContext>>

GetRequestAsync(string, string, CancellationToken)

One pending request, or null when it is not this subject's to answer.

Task<BackChannelAuthenticationRequestContext?> GetRequestAsync(string id, string subjectId, CancellationToken cancellationToken = default)

Parameters

id string
subjectId string
cancellationToken CancellationToken

Returns

Task<BackChannelAuthenticationRequestContext>