#### [Abblix\.Oidc\.Server\.MinimalApi](https://www.abblix.com/en/docs/api/abblix-oidc-server-minimalapi 'index')
### [Abblix\.Oidc\.Server\.MinimalApi\.Formatters\.Interfaces](https://www.abblix.com/en/docs/api/abblix-oidc-server-minimalapi/Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces 'Abblix\.Oidc\.Server\.MinimalApi\.Formatters\.Interfaces')

## IDeviceAuthorizationResponseFormatter Interface

Formats the result of a device authorization request \(RFC 8628\) into an [Microsoft\.AspNetCore\.Http\.IResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.iresult 'Microsoft\.AspNetCore\.Http\.IResult') \(the device\-code
response on success or the OAuth error otherwise\)\.

```csharp
public interface IDeviceAuthorizationResponseFormatter
```

Derived  
↳ [DeviceAuthorizationResponseFormatter](https://www.abblix.com/en/docs/api/abblix-oidc-server-minimalapi/Abblix.Oidc.Server.MinimalApi.Formatters.DeviceAuthorizationResponseFormatter 'Abblix\.Oidc\.Server\.MinimalApi\.Formatters\.DeviceAuthorizationResponseFormatter')
### Methods

## IDeviceAuthorizationResponseFormatter\.FormatResponseAsync\(DeviceAuthorizationRequest, Result\<DeviceAuthorizationResponse,OidcError\>\) Method {#Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces.IDeviceAuthorizationResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.DeviceAuthorizationRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Model.DeviceAuthorizationResponse,Abblix.Oidc.Server.Common.OidcError_)}

Formats the device authorization endpoint result\.

```csharp
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](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.DeviceAuthorizationRequest 'Abblix\.Oidc\.Server\.Model\.DeviceAuthorizationRequest') {#Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces.IDeviceAuthorizationResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.DeviceAuthorizationRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Model.DeviceAuthorizationResponse,Abblix.Oidc.Server.Common.OidcError_).request}

The core device authorization request being answered\.

###### `response` [Abblix\.Utils\.Result&lt;](https://www.abblix.com/en/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[DeviceAuthorizationResponse](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.DeviceAuthorizationResponse 'Abblix\.Oidc\.Server\.Model\.DeviceAuthorizationResponse')[,](https://www.abblix.com/en/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[OidcError](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.OidcError 'Abblix\.Oidc\.Server\.Common\.OidcError')[&gt;](https://www.abblix.com/en/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2') {#Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces.IDeviceAuthorizationResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.DeviceAuthorizationRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Model.DeviceAuthorizationResponse,Abblix.Oidc.Server.Common.OidcError_).response}

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

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[Microsoft\.AspNetCore\.Http\.IResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.iresult 'Microsoft\.AspNetCore\.Http\.IResult')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
An [Microsoft\.AspNetCore\.Http\.IResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.iresult 'Microsoft\.AspNetCore\.Http\.IResult') carrying the device\-code response or the formatted error\.
