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
clientValidatorIClientSecretValidatorAuthenticates the client from the credential it presented.
secretParserISecretsListParserReads the client's credential from the request.
requestValidatorIDeviceAuthorizationRequestValidatorValidates the device authorization request's parameters.
responseGeneratorIDeviceAuthorizationResponseGeneratorIssues the device and user codes and builds the response.
issuerNameServiceIIssuerNameServiceNames this server as the issuer of the request.
eventsIEventServiceReceives 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
contextHttpContext