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

## ClientCertificateBinder Class

Model binder that supplies the negotiated TLS client X\.509 certificate to an action parameter,
enabling support for mutual\-TLS client authentication and certificate\-bound access tokens \(RFC 8705\)\.
Reads from [Microsoft\.AspNetCore\.Http\.ConnectionInfo\.ClientCertificate](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.connectioninfo.clientcertificate 'Microsoft\.AspNetCore\.Http\.ConnectionInfo\.ClientCertificate'), falling back
to [Microsoft\.AspNetCore\.Http\.ConnectionInfo\.GetClientCertificateAsync\(System\.Threading\.CancellationToken\)](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.connectioninfo.getclientcertificateasync#microsoft-aspnetcore-http-connectioninfo-getclientcertificateasync(system-threading-cancellationtoken) 'Microsoft\.AspNetCore\.Http\.ConnectionInfo\.GetClientCertificateAsync\(System\.Threading\.CancellationToken\)') for renegotiation\.
When the server is fronted by a reverse proxy that terminates TLS, register
`CertificateForwardingMiddleware` beforehand so the forwarded header is hydrated into the connection\.

```csharp
public class ClientCertificateBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder
```

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

Implements [Microsoft\.AspNetCore\.Mvc\.ModelBinding\.IModelBinder](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.modelbinding.imodelbinder 'Microsoft\.AspNetCore\.Mvc\.ModelBinding\.IModelBinder')
### Methods

## ClientCertificateBinder\.BindModelAsync\(ModelBindingContext\) Method {#Abblix.Oidc.Server.Mvc.Binders.ClientCertificateBinder.BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext)}

Resolves the client certificate for the current connection and assigns it as the binding result\.
The result is null when no certificate is present, which is the expected case for non\-mTLS clients\.

```csharp
public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext);
```
#### Parameters

###### `bindingContext` [Microsoft\.AspNetCore\.Mvc\.ModelBinding\.ModelBindingContext](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.modelbinding.modelbindingcontext 'Microsoft\.AspNetCore\.Mvc\.ModelBinding\.ModelBindingContext') {#Abblix.Oidc.Server.Mvc.Binders.ClientCertificateBinder.BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext).bindingContext}

Implements [BindModelAsync\(ModelBindingContext\)](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.modelbinding.imodelbinder.bindmodelasync#microsoft-aspnetcore-mvc-modelbinding-imodelbinder-bindmodelasync(microsoft-aspnetcore-mvc-modelbinding-modelbindingcontext) 'Microsoft\.AspNetCore\.Mvc\.ModelBinding\.IModelBinder\.BindModelAsync\(Microsoft\.AspNetCore\.Mvc\.ModelBinding\.ModelBindingContext\)')

#### Returns
[System\.Threading\.Tasks\.Task](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task 'System\.Threading\.Tasks\.Task')
