Skip to content

IDeviceAuthorizationResponseFormatter Interface

Formats the result of a device authorization request (RFC 8628) into an Microsoft.AspNetCore.Http.IResult (the device-code response on success or the OAuth error otherwise).

C#
public interface IDeviceAuthorizationResponseFormatter

Derived
DeviceAuthorizationResponseFormatter

Methods

IDeviceAuthorizationResponseFormatter.FormatResponseAsync(DeviceAuthorizationRequest, Result<DeviceAuthorizationResponse,OidcError>) Method

Formats the device authorization endpoint result.

C#
System.Threading.Tasks.Task<Microsoft.AspNetCore.Http.IResult> FormatResponseAsync(Abblix.Oidc.Server.Model.DeviceAuthorizationRequest request, Abblix.Utils.Result<Abblix.Oidc.Server.Model.DeviceAuthorizationResponse,Abblix.Oidc.Server.Common.OidcError> response);

Parameters

request DeviceAuthorizationRequest

The core device authorization request being answered.

response Abblix.Utils.Result<DeviceAuthorizationResponse,OidcError>

The success-or-error result produced by the device authorization handler.

Returns

System.Threading.Tasks.Task<Microsoft.AspNetCore.Http.IResult>
An Microsoft.AspNetCore.Http.IResult carrying the device-code response or the formatted error.