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

## ITokenResponseFormatter Interface

Defines an interface for formatting an OAuth 2\.0 token response as a low\-level response object to return to the client\.

```csharp
public interface ITokenResponseFormatter
```

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

## ITokenResponseFormatter\.FormatResponseAsync\(TokenRequest, Result\<TokenIssued,OidcError\>\) Method {#Abblix.Oidc.Server.Mvc.Formatters.Interfaces.ITokenResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.TokenRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Endpoints.Token.Interfaces.TokenIssued,Abblix.Oidc.Server.Common.OidcError_)}

Formats an OAuth 2\.0 token response asynchronously as a low\-level response object to return to the client\.

```csharp
System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult<Abblix.Oidc.Server.Model.TokenResponse>> FormatResponseAsync(Abblix.Oidc.Server.Model.TokenRequest request, Abblix.Utils.Result<Abblix.Oidc.Server.Endpoints.Token.Interfaces.TokenIssued,Abblix.Oidc.Server.Common.OidcError> response);
```
#### Parameters

###### `request` [TokenRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.TokenRequest 'Abblix\.Oidc\.Server\.Model\.TokenRequest') {#Abblix.Oidc.Server.Mvc.Formatters.Interfaces.ITokenResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.TokenRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Endpoints.Token.Interfaces.TokenIssued,Abblix.Oidc.Server.Common.OidcError_).request}

The token request\.

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

The token response to be formatted\.

#### 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\.Mvc\.ActionResult&lt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.actionresult-1 'Microsoft\.AspNetCore\.Mvc\.ActionResult\`1')[TokenResponse](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.TokenResponse 'Abblix\.Oidc\.Server\.Model\.TokenResponse')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.actionresult-1 'Microsoft\.AspNetCore\.Mvc\.ActionResult\`1')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
A [System\.Threading\.Tasks\.Task](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task 'System\.Threading\.Tasks\.Task') representing the asynchronous operation, with the formatted response as an [Microsoft\.AspNetCore\.Mvc\.ActionResult&lt;&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.actionresult-1 'Microsoft\.AspNetCore\.Mvc\.ActionResult\`1') containing a [TokenResponse](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.TokenResponse 'Abblix\.Oidc\.Server\.Model\.TokenResponse')\.
