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

## BackChannelAuthenticationResponseFormatter Class

Formats CIBA backchannel authentication results as [Microsoft\.AspNetCore\.Http\.IResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.iresult 'Microsoft\.AspNetCore\.Http\.IResult'): a JSON success response, a 401 with a
`WWW-Authenticate` challenge matching the client's scheme, a 403, or a 400 with the JSON error envelope\.

```csharp
public class BackChannelAuthenticationResponseFormatter : Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces.IBackChannelAuthenticationResponseFormatter
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → BackChannelAuthenticationResponseFormatter

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

## BackChannelAuthenticationResponseFormatter\(IIssuerProvider\) Constructor {#Abblix.Oidc.Server.MinimalApi.Formatters.BackChannelAuthenticationResponseFormatter.BackChannelAuthenticationResponseFormatter(Abblix.Oidc.Server.Features.Issuer.IIssuerProvider)}

Formats CIBA backchannel authentication results as [Microsoft\.AspNetCore\.Http\.IResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.iresult 'Microsoft\.AspNetCore\.Http\.IResult'): a JSON success response, a 401 with a
`WWW-Authenticate` challenge matching the client's scheme, a 403, or a 400 with the JSON error envelope\.

```csharp
public BackChannelAuthenticationResponseFormatter(Abblix.Oidc.Server.Features.Issuer.IIssuerProvider issuerProvider);
```
#### Parameters

###### `issuerProvider` [IIssuerProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Issuer.IIssuerProvider 'Abblix\.Oidc\.Server\.Features\.Issuer\.IIssuerProvider') {#Abblix.Oidc.Server.MinimalApi.Formatters.BackChannelAuthenticationResponseFormatter.BackChannelAuthenticationResponseFormatter(Abblix.Oidc.Server.Features.Issuer.IIssuerProvider).issuerProvider}

Supplies the issuer used as the realm on client\-authentication challenges\.
### Methods

## BackChannelAuthenticationResponseFormatter\.FormatResponseAsync\(BackChannelAuthenticationRequest, ClientRequest, Result\<BackChannelAuthenticationSuccess,OidcError\>\) Method {#Abblix.Oidc.Server.MinimalApi.Formatters.BackChannelAuthenticationResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.BackChannelAuthenticationRequest,Abblix.Oidc.Server.Model.ClientRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Model.BackChannelAuthenticationSuccess,Abblix.Oidc.Server.Common.OidcError_)}

Formats the backchannel authentication result: a JSON success response, or the RFC\-compliant OAuth error
\(401 with a `WWW-Authenticate` challenge, 403, or 400 depending on the failure\)\.

```csharp
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Http.IResult> FormatResponseAsync(Abblix.Oidc.Server.Model.BackChannelAuthenticationRequest request, Abblix.Oidc.Server.Model.ClientRequest clientRequest, Abblix.Utils.Result<Abblix.Oidc.Server.Model.BackChannelAuthenticationSuccess,Abblix.Oidc.Server.Common.OidcError> response);
```
#### Parameters

###### `request` [BackChannelAuthenticationRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.BackChannelAuthenticationRequest 'Abblix\.Oidc\.Server\.Model\.BackChannelAuthenticationRequest') {#Abblix.Oidc.Server.MinimalApi.Formatters.BackChannelAuthenticationResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.BackChannelAuthenticationRequest,Abblix.Oidc.Server.Model.ClientRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Model.BackChannelAuthenticationSuccess,Abblix.Oidc.Server.Common.OidcError_).request}

The original backchannel authentication request that triggered the response\.

###### `clientRequest` [ClientRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.ClientRequest 'Abblix\.Oidc\.Server\.Model\.ClientRequest') {#Abblix.Oidc.Server.MinimalApi.Formatters.BackChannelAuthenticationResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.BackChannelAuthenticationRequest,Abblix.Oidc.Server.Model.ClientRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Model.BackChannelAuthenticationSuccess,Abblix.Oidc.Server.Common.OidcError_).clientRequest}

The client request, used to match the `WWW-Authenticate` scheme on a 401
            per RFC 6749 §5\.2\.

###### `response` [Abblix\.Utils\.Result&lt;](https://www.abblix.com/en/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[BackChannelAuthenticationSuccess](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.BackChannelAuthenticationSuccess 'Abblix\.Oidc\.Server\.Model\.BackChannelAuthenticationSuccess')[,](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.BackChannelAuthenticationResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.BackChannelAuthenticationRequest,Abblix.Oidc.Server.Model.ClientRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Model.BackChannelAuthenticationSuccess,Abblix.Oidc.Server.Common.OidcError_).response}

The backchannel authentication result to format\.

Implements [FormatResponseAsync\(BackChannelAuthenticationRequest, ClientRequest, Result&lt;BackChannelAuthenticationSuccess,OidcError&gt;\)](https://www.abblix.com/en/docs/api/abblix-oidc-server-minimalapi/Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces.IBackChannelAuthenticationResponseFormatter#Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces.IBackChannelAuthenticationResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.BackChannelAuthenticationRequest,Abblix.Oidc.Server.Model.ClientRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Model.BackChannelAuthenticationSuccess,Abblix.Oidc.Server.Common.OidcError_) 'Abblix\.Oidc\.Server\.MinimalApi\.Formatters\.Interfaces\.IBackChannelAuthenticationResponseFormatter\.FormatResponseAsync\(Abblix\.Oidc\.Server\.Model\.BackChannelAuthenticationRequest, Abblix\.Oidc\.Server\.Model\.ClientRequest, Abblix\.Utils\.Result\<Abblix\.Oidc\.Server\.Model\.BackChannelAuthenticationSuccess,Abblix\.Oidc\.Server\.Common\.OidcError\>\)')

#### 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')
