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

## RegisterClientResponseFormatter Class

Provides a response formatter for client registration responses\.

```csharp
public class RegisterClientResponseFormatter : Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRegisterClientResponseFormatter
```

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

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

## RegisterClientResponseFormatter\(IUriResolver\) Constructor {#Abblix.Oidc.Server.Mvc.Formatters.RegisterClientResponseFormatter.RegisterClientResponseFormatter(Abblix.Oidc.Server.Mvc.IUriResolver)}

Provides a response formatter for client registration responses\.

```csharp
public RegisterClientResponseFormatter(Abblix.Oidc.Server.Mvc.IUriResolver uriResolver);
```
#### Parameters

###### `uriResolver` [IUriResolver](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.IUriResolver 'Abblix\.Oidc\.Server\.Mvc\.IUriResolver') {#Abblix.Oidc.Server.Mvc.Formatters.RegisterClientResponseFormatter.RegisterClientResponseFormatter(Abblix.Oidc.Server.Mvc.IUriResolver).uriResolver}

The action URI provider used for generating URIs for client management actions\.
### Methods

## RegisterClientResponseFormatter\.FormatResponseAsync\(ClientRegistrationRequest, Result\<ClientRegistrationSuccessResponse,OidcError\>\) Method {#Abblix.Oidc.Server.Mvc.Formatters.RegisterClientResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.ClientRegistrationRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.ClientRegistrationSuccessResponse,Abblix.Oidc.Server.Common.OidcError_)}

Formats a client registration response asynchronously, converting the response model to an appropriate
[Microsoft\.AspNetCore\.Mvc\.ActionResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.actionresult 'Microsoft\.AspNetCore\.Mvc\.ActionResult') based on the nature of the response\.

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

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

The client registration request containing the data submitted by the client\.

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

The client registration response model to be formatted\.

Implements [FormatResponseAsync\(ClientRegistrationRequest, Result&lt;ClientRegistrationSuccessResponse,OidcError&gt;\)](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRegisterClientResponseFormatter#Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRegisterClientResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.ClientRegistrationRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.ClientRegistrationSuccessResponse,Abblix.Oidc.Server.Common.OidcError_) 'Abblix\.Oidc\.Server\.Mvc\.Formatters\.Interfaces\.IRegisterClientResponseFormatter\.FormatResponseAsync\(Abblix\.Oidc\.Server\.Model\.ClientRegistrationRequest, Abblix\.Utils\.Result\<Abblix\.Oidc\.Server\.Endpoints\.DynamicClientManagement\.Interfaces\.ClientRegistrationSuccessResponse,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\.Mvc\.ActionResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.actionresult 'Microsoft\.AspNetCore\.Mvc\.ActionResult')[&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](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.actionresult 'Microsoft\.AspNetCore\.Mvc\.ActionResult')\.
Depending on the response, this may be a success result with client details or an error response\.

### Remarks
This method handles different types of responses: successful registration and error scenarios\.
In the case of successful registration, it returns a 201 Created response with client details\.
In the case of an error, it returns a 400 Bad Request response with error details\.
