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

## EndSessionResponseFormatter Class

Formats end\-session results as [Microsoft\.AspNetCore\.Http\.IResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.iresult 'Microsoft\.AspNetCore\.Http\.IResult'): a front\-channel\-logout HTML page \(with a per\-response CSP
nonce\), a post\-logout redirect, an empty 204, or the JSON OAuth error\.

```csharp
public class EndSessionResponseFormatter : Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces.IEndSessionResponseFormatter
```

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

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

## EndSessionResponseFormatter\(IFrontChannelLogoutService\) Constructor {#Abblix.Oidc.Server.MinimalApi.Formatters.EndSessionResponseFormatter.EndSessionResponseFormatter(Abblix.Oidc.Server.Features.LogoutNotification.IFrontChannelLogoutService)}

Formats end\-session results as [Microsoft\.AspNetCore\.Http\.IResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.iresult 'Microsoft\.AspNetCore\.Http\.IResult'): a front\-channel\-logout HTML page \(with a per\-response CSP
nonce\), a post\-logout redirect, an empty 204, or the JSON OAuth error\.

```csharp
public EndSessionResponseFormatter(Abblix.Oidc.Server.Features.LogoutNotification.IFrontChannelLogoutService frontChannelLogoutService);
```
#### Parameters

###### `frontChannelLogoutService` [IFrontChannelLogoutService](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.LogoutNotification.IFrontChannelLogoutService 'Abblix\.Oidc\.Server\.Features\.LogoutNotification\.IFrontChannelLogoutService') {#Abblix.Oidc.Server.MinimalApi.Formatters.EndSessionResponseFormatter.EndSessionResponseFormatter(Abblix.Oidc.Server.Features.LogoutNotification.IFrontChannelLogoutService).frontChannelLogoutService}

Builds the front\-channel logout HTML response\.
### Methods

## EndSessionResponseFormatter\.FormatResponseAsync\(EndSessionRequest, Result\<EndSessionSuccess,OidcError\>\) Method {#Abblix.Oidc.Server.MinimalApi.Formatters.EndSessionResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.EndSessionRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Endpoints.EndSession.Interfaces.EndSessionSuccess,Abblix.Oidc.Server.Common.OidcError_)}

Formats the end\-session result: a front\-channel\-logout HTML page, a post\-logout redirect, an empty 204, or an
OAuth error\.

```csharp
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Http.IResult> FormatResponseAsync(Abblix.Oidc.Server.Model.EndSessionRequest request, Abblix.Utils.Result<Abblix.Oidc.Server.Endpoints.EndSession.Interfaces.EndSessionSuccess,Abblix.Oidc.Server.Common.OidcError> response);
```
#### Parameters

###### `request` [EndSessionRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.EndSessionRequest 'Abblix\.Oidc\.Server\.Model\.EndSessionRequest') {#Abblix.Oidc.Server.MinimalApi.Formatters.EndSessionResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.EndSessionRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Endpoints.EndSession.Interfaces.EndSessionSuccess,Abblix.Oidc.Server.Common.OidcError_).request}

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

Implements [FormatResponseAsync\(EndSessionRequest, Result&lt;EndSessionSuccess,OidcError&gt;\)](https://www.abblix.com/en/docs/api/abblix-oidc-server-minimalapi/Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces.IEndSessionResponseFormatter#Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces.IEndSessionResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.EndSessionRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Endpoints.EndSession.Interfaces.EndSessionSuccess,Abblix.Oidc.Server.Common.OidcError_) 'Abblix\.Oidc\.Server\.MinimalApi\.Formatters\.Interfaces\.IEndSessionResponseFormatter\.FormatResponseAsync\(Abblix\.Oidc\.Server\.Model\.EndSessionRequest, Abblix\.Utils\.Result\<Abblix\.Oidc\.Server\.Endpoints\.EndSession\.Interfaces\.EndSessionSuccess,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')
