Table of Contents

Interface IDeviceCodeValidator

Namespace
Fdyay.IdentityServer.Validation
Assembly
Fdyay.IdentityServer.Core.dll

Validates a device code presented at the token endpoint (RFC 8628 §3.4–3.5).

public interface IDeviceCodeValidator

Remarks

Duende 8.0.1's IDeviceCodeValidator, measured, in its order: an unknown code, or another client's, is invalid_grant; a device polling too fast is slow_down; an expired code expired_token; a code the user answered with nothing granted access_denied; one not yet answered authorization_pending; a user the profile service no longer calls active (caller DeviceCodeValidation) invalid_grant; otherwise the code is spent and the request carries it, its user and its session.

Methods

ValidateAsync(DeviceCodeValidationContext, CancellationToken)

Validates the context's device code and sets its Result.

Task ValidateAsync(DeviceCodeValidationContext context, CancellationToken ct)

Parameters

context DeviceCodeValidationContext

The presented code and the token request; the answer is written to its Result.

ct CancellationToken

Cancels the store lookups and the profile service call.

Returns

Task

A task that completes once Result is set.