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

## TlsMetadataClientAuthenticator Class

RFC 8705 tls\_client\_auth authenticator\. Matches presented client certificate against
client metadata: subject DN and/or Subject Alternative Name entries\.

```csharp
public class TlsMetadataClientAuthenticator : Abblix.Oidc.Server.Features.ClientAuthentication.IClientAuthenticator
```

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

Implements [IClientAuthenticator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientAuthentication.IClientAuthenticator 'Abblix\.Oidc\.Server\.Features\.ClientAuthentication\.IClientAuthenticator')
### Constructors

## TlsMetadataClientAuthenticator\(ILogger\<TlsMetadataClientAuthenticator\>, IClientInfoProvider\) Constructor {#Abblix.Oidc.Server.Features.ClientAuthentication.TlsMetadataClientAuthenticator.TlsMetadataClientAuthenticator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.ClientAuthentication.TlsMetadataClientAuthenticator_,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider)}

RFC 8705 tls\_client\_auth authenticator\. Matches presented client certificate against
client metadata: subject DN and/or Subject Alternative Name entries\.

```csharp
public TlsMetadataClientAuthenticator(Microsoft.Extensions.Logging.ILogger<Abblix.Oidc.Server.Features.ClientAuthentication.TlsMetadataClientAuthenticator> logger, Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider clientInfoProvider);
```
#### Parameters

###### `logger` [Microsoft\.Extensions\.Logging\.ILogger&lt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger-1 'Microsoft\.Extensions\.Logging\.ILogger\`1')[TlsMetadataClientAuthenticator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientAuthentication.TlsMetadataClientAuthenticator 'Abblix\.Oidc\.Server\.Features\.ClientAuthentication\.TlsMetadataClientAuthenticator')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger-1 'Microsoft\.Extensions\.Logging\.ILogger\`1') {#Abblix.Oidc.Server.Features.ClientAuthentication.TlsMetadataClientAuthenticator.TlsMetadataClientAuthenticator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.ClientAuthentication.TlsMetadataClientAuthenticator_,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider).logger}

###### `clientInfoProvider` [IClientInfoProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider 'Abblix\.Oidc\.Server\.Features\.ClientInformation\.IClientInfoProvider') {#Abblix.Oidc.Server.Features.ClientAuthentication.TlsMetadataClientAuthenticator.TlsMetadataClientAuthenticator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.ClientAuthentication.TlsMetadataClientAuthenticator_,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider).clientInfoProvider}
### Properties

## TlsMetadataClientAuthenticator\.ClientAuthenticationMethodsSupported Property {#Abblix.Oidc.Server.Features.ClientAuthentication.TlsMetadataClientAuthenticator.ClientAuthenticationMethodsSupported}

Gets the collection of client authentication methods supported by this authenticator\.

```csharp
public System.Collections.Generic.IEnumerable<string> ClientAuthenticationMethodsSupported { get; }
```

Implements [ClientAuthenticationMethodsSupported](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientAuthentication.IClientAuthenticator#Abblix.Oidc.Server.Features.ClientAuthentication.IClientAuthenticator.ClientAuthenticationMethodsSupported 'Abblix\.Oidc\.Server\.Features\.ClientAuthentication\.IClientAuthenticator\.ClientAuthenticationMethodsSupported')

#### Property Value
[System\.Collections\.Generic\.IEnumerable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')  
A collection containing [TlsClientAuth](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ClientAuthenticationMethods#Abblix.Oidc.Server.Common.Constants.ClientAuthenticationMethods.TlsClientAuth 'Abblix\.Oidc\.Server\.Common\.Constants\.ClientAuthenticationMethods\.TlsClientAuth')\.
### Methods

## TlsMetadataClientAuthenticator\.TryAuthenticateClientAsync\(ClientRequest\) Method {#Abblix.Oidc.Server.Features.ClientAuthentication.TlsMetadataClientAuthenticator.TryAuthenticateClientAsync(Abblix.Oidc.Server.Model.ClientRequest)}

Attempts to authenticate a client using mutual TLS with metadata\-based certificate validation\.
Validates the client certificate against configured Subject DN and/or Subject Alternative Name entries\.

```csharp
public System.Threading.Tasks.Task<Abblix.Oidc.Server.Features.ClientInformation.ClientInfo?> TryAuthenticateClientAsync(Abblix.Oidc.Server.Model.ClientRequest request);
```
#### Parameters

###### `request` [ClientRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.ClientRequest 'Abblix\.Oidc\.Server\.Model\.ClientRequest') {#Abblix.Oidc.Server.Features.ClientAuthentication.TlsMetadataClientAuthenticator.TryAuthenticateClientAsync(Abblix.Oidc.Server.Model.ClientRequest).request}

The client request containing the certificate and client ID to authenticate\.

Implements [TryAuthenticateClientAsync\(ClientRequest\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientAuthentication.IClientAuthenticator#Abblix.Oidc.Server.Features.ClientAuthentication.IClientAuthenticator.TryAuthenticateClientAsync(Abblix.Oidc.Server.Model.ClientRequest) 'Abblix\.Oidc\.Server\.Features\.ClientAuthentication\.IClientAuthenticator\.TryAuthenticateClientAsync\(Abblix\.Oidc\.Server\.Model\.ClientRequest\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[ClientInfo](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientInformation.ClientInfo 'Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
A task that returns the authenticated [ClientInfo](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientInformation.ClientInfo 'Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo') if successful; otherwise, null\.
Returns null if no certificate is provided, client not found, authentication method doesn't match,
or certificate validation fails\.

### Remarks
This method implements RFC 8705 tls\_client\_auth by:
1\. Verifying a client certificate is present
2\. Looking up client configuration by client\_id
3\. Checking the client uses tls\_client\_auth method
4\. Validating certificate Subject DN \(if configured\)
5\. Validating certificate SAN entries \(if configured\)
