Table of Contents

Class DeviceAuthorizationEndpoint

Namespace
Fdyay.IdentityServer.Endpoints
Assembly
Fdyay.IdentityServer.AspNetCore.dll

The OAuth 2.0 device authorization endpoint (RFC 8628).

public sealed class DeviceAuthorizationEndpoint : IEndpointHandler
Inheritance
DeviceAuthorizationEndpoint
Implements
Inherited Members

Remarks

For clients on devices that cannot host a browser or take text input. The device posts here, shows the user a short code and a URL, and then polls the token endpoint while the user approves on a device that does have a keyboard.

Constructors

DeviceAuthorizationEndpoint(IClientSecretValidator, ISecretsListParser, IDeviceAuthorizationRequestValidator, IDeviceAuthorizationResponseGenerator, IIssuerNameService, IEventService)

Creates the endpoint from its services, as the container resolves it.

public DeviceAuthorizationEndpoint(IClientSecretValidator clientValidator, ISecretsListParser secretParser, IDeviceAuthorizationRequestValidator requestValidator, IDeviceAuthorizationResponseGenerator responseGenerator, IIssuerNameService issuerNameService, IEventService events)

Parameters

clientValidator IClientSecretValidator

Authenticates the client from the credential it presented.

secretParser ISecretsListParser

Reads the client's credential from the request.

requestValidator IDeviceAuthorizationRequestValidator

Validates the device authorization request's parameters.

responseGenerator IDeviceAuthorizationResponseGenerator

Issues the device and user codes and builds the response.

issuerNameService IIssuerNameService

Names this server as the issuer of the request.

events IEventService

Receives the endpoint's success and failure events.

Methods

ProcessAsync(HttpContext)

Processes the request, or returns null to pass the request through.

public Task<IEndpointResult?> ProcessAsync(HttpContext context)

Parameters

context HttpContext

Returns

Task<IEndpointResult>