Table of Contents

Interface IDeviceFlowInteractionService

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

Surfaces a pending device authorization to the UI, and records the user's answer.

public interface IDeviceFlowInteractionService

Methods

GetAuthorizationContextAsync(string, CancellationToken)

Resolves a user code to the request it identifies, or null if there is no live request for it.

Task<DeviceFlowAuthorizationRequest?> GetAuthorizationContextAsync(string userCode, CancellationToken cancellationToken = default)

Parameters

userCode string
cancellationToken CancellationToken

Returns

Task<DeviceFlowAuthorizationRequest>

HandleRequestAsync(string, ConsentResponse, string, CancellationToken)

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

Task<bool> HandleRequestAsync(string userCode, ConsentResponse consent, string subjectId, CancellationToken cancellationToken = default)

Parameters

userCode string
consent ConsentResponse
subjectId string
cancellationToken CancellationToken

Returns

Task<bool>