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

## ClientManagementController Class

The ClientManagementController is responsible for handling client\-related operations in the context of OAuth 2\.0 and
OpenID Connect\. This includes dynamic client registration, reading client configurations, and deleting registered clients\.

```csharp
public class ClientManagementController : Microsoft.AspNetCore.Mvc.ControllerBase
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → [Microsoft\.AspNetCore\.Mvc\.ControllerBase](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.controllerbase 'Microsoft\.AspNetCore\.Mvc\.ControllerBase') → ClientManagementController

### Remarks
The controller adheres to the OpenID Connect Dynamic Client Registration protocol, allowing clients to register themselves
dynamically with the authorization server\. It supports operations like registering new clients, querying existing client configurations,
and removing clients\. This is crucial for systems where client applications need to be managed programmatically without manual intervention\.
For detailed protocol specifications, refer to [https://openid.net/specs/openid-connect-registration-1\_0.html](https://openid.net/specs/openid-connect-registration-1_0.html 'https://openid.net/specs/openid-connect-registration-1\_0.html')\.
### Methods

## ClientManagementController\.ReadClientAsync\(IReadClientHandler, IReadClientResponseFormatter, ClientAuthorizationRequest\) Method {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.ReadClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IReadClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IReadClientResponseFormatter,Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest)}

Retrieves the configuration of a previously registered client from the authorization server\.

```csharp
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult> ReadClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IReadClientHandler handler, Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IReadClientResponseFormatter formatter, Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest authorizationRequest);
```
#### Parameters

###### `handler` [IReadClientHandler](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IReadClientHandler 'Abblix\.Oidc\.Server\.Endpoints\.DynamicClientManagement\.Interfaces\.IReadClientHandler') {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.ReadClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IReadClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IReadClientResponseFormatter,Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest).handler}

The handler responsible for processing client information requests\.

###### `formatter` [IReadClientResponseFormatter](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IReadClientResponseFormatter 'Abblix\.Oidc\.Server\.Mvc\.Formatters\.Interfaces\.IReadClientResponseFormatter') {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.ReadClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IReadClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IReadClientResponseFormatter,Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest).formatter}

The formatter responsible for generating the client information response\.

###### `authorizationRequest` [ClientAuthorizationRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest 'Abblix\.Oidc\.Server\.Mvc\.Model\.ClientAuthorizationRequest') {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.ReadClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IReadClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IReadClientResponseFormatter,Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest).authorizationRequest}

The client authorization request containing client\_id and registration\_access\_token\.

#### 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 task that returns an action result that includes
            the client information response\.

### Remarks
This method allows clients to query their current configuration stored by the authorization server\.
Per RFC 7592 Section 2\.1, the endpoint URL format is /connect/register/\{client\_id\}\.
The registration\_access\_token is passed via Authorization: Bearer header\.

## ClientManagementController\.RegisterClientAsync\(IRegisterClientHandler, IRegisterClientResponseFormatter, ClientRegistrationRequest, AuthenticationHeaderValue\) Method {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.RegisterClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IRegisterClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRegisterClientResponseFormatter,Abblix.Oidc.Server.Model.ClientRegistrationRequest,System.Net.Http.Headers.AuthenticationHeaderValue)}

Registers a new client dynamically with the authorization server\. This endpoint processes the client
registration requests by validating the provided details and creating a new client configuration\.

```csharp
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult> RegisterClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IRegisterClientHandler handler, Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRegisterClientResponseFormatter formatter, Abblix.Oidc.Server.Model.ClientRegistrationRequest request, System.Net.Http.Headers.AuthenticationHeaderValue? authorizationHeader);
```
#### Parameters

###### `handler` [IRegisterClientHandler](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IRegisterClientHandler 'Abblix\.Oidc\.Server\.Endpoints\.DynamicClientManagement\.Interfaces\.IRegisterClientHandler') {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.RegisterClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IRegisterClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRegisterClientResponseFormatter,Abblix.Oidc.Server.Model.ClientRegistrationRequest,System.Net.Http.Headers.AuthenticationHeaderValue).handler}

The handler responsible for processing client registration requests\.

###### `formatter` [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') {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.RegisterClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IRegisterClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRegisterClientResponseFormatter,Abblix.Oidc.Server.Model.ClientRegistrationRequest,System.Net.Http.Headers.AuthenticationHeaderValue).formatter}

The formatter responsible for generating the client registration response\.

###### `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.Controllers.ClientManagementController.RegisterClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IRegisterClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRegisterClientResponseFormatter,Abblix.Oidc.Server.Model.ClientRegistrationRequest,System.Net.Http.Headers.AuthenticationHeaderValue).request}

The details of the client registration request\.

###### `authorizationHeader` [System\.Net\.Http\.Headers\.AuthenticationHeaderValue](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.headers.authenticationheadervalue 'System\.Net\.Http\.Headers\.AuthenticationHeaderValue') {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.RegisterClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IRegisterClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRegisterClientResponseFormatter,Abblix.Oidc.Server.Model.ClientRegistrationRequest,System.Net.Http.Headers.AuthenticationHeaderValue).authorizationHeader}

The optional initial access token from the Authorization header,
            used to authenticate the registration request per RFC 7591 Section 3\.

#### 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 task that returns an action result that includes
            the client registration response\.

### Remarks
This method implements the OpenID Connect Dynamic Client Registration protocol, facilitating clients
to register dynamically\. It validates the request, processes it if valid, and formats a response that
can include either the successful registration details or an error message\.

## ClientManagementController\.RemoveClientAsync\(IRemoveClientHandler, IRemoveClientResponseFormatter, ClientAuthorizationRequest\) Method {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.RemoveClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IRemoveClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRemoveClientResponseFormatter,Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest)}

Removes a registered client's configuration from the authorization server, effectively revoking its registration
and access\.

```csharp
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult> RemoveClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IRemoveClientHandler handler, Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRemoveClientResponseFormatter formatter, Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest authorizationRequest);
```
#### Parameters

###### `handler` [IRemoveClientHandler](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IRemoveClientHandler 'Abblix\.Oidc\.Server\.Endpoints\.DynamicClientManagement\.Interfaces\.IRemoveClientHandler') {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.RemoveClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IRemoveClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRemoveClientResponseFormatter,Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest).handler}

The handler responsible for processing client removal requests\.

###### `formatter` [IRemoveClientResponseFormatter](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRemoveClientResponseFormatter 'Abblix\.Oidc\.Server\.Mvc\.Formatters\.Interfaces\.IRemoveClientResponseFormatter') {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.RemoveClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IRemoveClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRemoveClientResponseFormatter,Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest).formatter}

The formatter responsible for generating the client removal response\.

###### `authorizationRequest` [ClientAuthorizationRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest 'Abblix\.Oidc\.Server\.Mvc\.Model\.ClientAuthorizationRequest') {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.RemoveClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IRemoveClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRemoveClientResponseFormatter,Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest).authorizationRequest}

The client authorization request containing client\_id and registration\_access\_token\.

#### 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 task that returns an action result that confirms
            the client removal\.

### Remarks
This method supports the removal of clients from the authorization server per RFC 7592 Section 2\.3\.
Per RFC 7592, the endpoint URL format is /connect/register/\{client\_id\}\.
The registration\_access\_token is passed via Authorization: Bearer header\.

## ClientManagementController\.UpdateClientAsync\(IUpdateClientHandler, IUpdateClientResponseFormatter, ClientAuthorizationRequest, ClientRegistrationRequest\) Method {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.UpdateClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IUpdateClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IUpdateClientResponseFormatter,Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest,Abblix.Oidc.Server.Model.ClientRegistrationRequest)}

Updates a registered client's configuration with new metadata per RFC 7592 Section 2\.2\.

```csharp
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult> UpdateClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IUpdateClientHandler handler, Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IUpdateClientResponseFormatter formatter, Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest authorizationRequest, Abblix.Oidc.Server.Model.ClientRegistrationRequest registrationRequest);
```
#### Parameters

###### `handler` [IUpdateClientHandler](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IUpdateClientHandler 'Abblix\.Oidc\.Server\.Endpoints\.DynamicClientManagement\.Interfaces\.IUpdateClientHandler') {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.UpdateClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IUpdateClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IUpdateClientResponseFormatter,Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest,Abblix.Oidc.Server.Model.ClientRegistrationRequest).handler}

The handler responsible for processing client update requests\.

###### `formatter` [IUpdateClientResponseFormatter](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IUpdateClientResponseFormatter 'Abblix\.Oidc\.Server\.Mvc\.Formatters\.Interfaces\.IUpdateClientResponseFormatter') {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.UpdateClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IUpdateClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IUpdateClientResponseFormatter,Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest,Abblix.Oidc.Server.Model.ClientRegistrationRequest).formatter}

The formatter responsible for generating the client update response\.

###### `authorizationRequest` [ClientAuthorizationRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest 'Abblix\.Oidc\.Server\.Mvc\.Model\.ClientAuthorizationRequest') {#Abblix.Oidc.Server.Mvc.Controllers.ClientManagementController.UpdateClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IUpdateClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IUpdateClientResponseFormatter,Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest,Abblix.Oidc.Server.Model.ClientRegistrationRequest).authorizationRequest}

The client authorization request containing client\_id and registration\_access\_token\.

###### `registrationRequest` [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.Controllers.ClientManagementController.UpdateClientAsync(Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IUpdateClientHandler,Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IUpdateClientResponseFormatter,Abblix.Oidc.Server.Mvc.Model.ClientAuthorizationRequest,Abblix.Oidc.Server.Model.ClientRegistrationRequest).registrationRequest}

The updated client metadata from request body\.

#### 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 task that returns an action result with the updated client configuration\.

### Remarks
This method implements RFC 7592 OAuth 2\.0 Dynamic Client Registration Management Protocol Section 2\.2\.
Per RFC 7592, the endpoint URL format is /connect/register/\{client\_id\}\.
The registration\_access\_token is passed via Authorization: Bearer header\.
The request body must contain all client metadata including the client\_id and client\_secret\.
Returns 200 OK with updated configuration on success\.
