#### [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')

## ClientSecretPostAuthenticator Class

Implements an authentication of a client request by extracting client credentials \(client\_id and client\_secret\)
from the request body\. This approach is typically used in OAuth 2\.0 client credential flows where the client submits
its credentials as part of the request body\.

```csharp
public class ClientSecretPostAuthenticator : Abblix.Oidc.Server.Features.ClientAuthentication.ClientSecretAuthenticator, Abblix.Oidc.Server.Features.ClientAuthentication.IClientAuthenticator
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → [ClientSecretAuthenticator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientAuthentication.ClientSecretAuthenticator 'Abblix\.Oidc\.Server\.Features\.ClientAuthentication\.ClientSecretAuthenticator') → ClientSecretPostAuthenticator

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

## ClientSecretPostAuthenticator\(ILogger\<ClientSecretPostAuthenticator\>, IClientInfoProvider, TimeProvider, IHashService\) Constructor {#Abblix.Oidc.Server.Features.ClientAuthentication.ClientSecretPostAuthenticator.ClientSecretPostAuthenticator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.ClientAuthentication.ClientSecretPostAuthenticator_,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,System.TimeProvider,Abblix.Oidc.Server.Features.Hashing.IHashService)}

Implements an authentication of a client request by extracting client credentials \(client\_id and client\_secret\)
from the request body\. This approach is typically used in OAuth 2\.0 client credential flows where the client submits
its credentials as part of the request body\.

```csharp
public ClientSecretPostAuthenticator(Microsoft.Extensions.Logging.ILogger<Abblix.Oidc.Server.Features.ClientAuthentication.ClientSecretPostAuthenticator> logger, Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider clientInfoProvider, System.TimeProvider clock, Abblix.Oidc.Server.Features.Hashing.IHashService hashService);
```
#### 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')[ClientSecretPostAuthenticator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientAuthentication.ClientSecretPostAuthenticator 'Abblix\.Oidc\.Server\.Features\.ClientAuthentication\.ClientSecretPostAuthenticator')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger-1 'Microsoft\.Extensions\.Logging\.ILogger\`1') {#Abblix.Oidc.Server.Features.ClientAuthentication.ClientSecretPostAuthenticator.ClientSecretPostAuthenticator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.ClientAuthentication.ClientSecretPostAuthenticator_,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,System.TimeProvider,Abblix.Oidc.Server.Features.Hashing.IHashService).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.ClientSecretPostAuthenticator.ClientSecretPostAuthenticator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.ClientAuthentication.ClientSecretPostAuthenticator_,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,System.TimeProvider,Abblix.Oidc.Server.Features.Hashing.IHashService).clientInfoProvider}

###### `clock` [System\.TimeProvider](https://learn.microsoft.com/en-us/dotnet/api/system.timeprovider 'System\.TimeProvider') {#Abblix.Oidc.Server.Features.ClientAuthentication.ClientSecretPostAuthenticator.ClientSecretPostAuthenticator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.ClientAuthentication.ClientSecretPostAuthenticator_,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,System.TimeProvider,Abblix.Oidc.Server.Features.Hashing.IHashService).clock}

###### `hashService` [IHashService](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Hashing.IHashService 'Abblix\.Oidc\.Server\.Features\.Hashing\.IHashService') {#Abblix.Oidc.Server.Features.ClientAuthentication.ClientSecretPostAuthenticator.ClientSecretPostAuthenticator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.ClientAuthentication.ClientSecretPostAuthenticator_,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,System.TimeProvider,Abblix.Oidc.Server.Features.Hashing.IHashService).hashService}
### Properties

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

Specifies the client authentication method this authenticator supports, which is 'client\_secret\_post'\.
This property indicates that the authenticator is designed to handle client authentication where the client secret
is sent in the request body parameters\. It is a straightforward method for clients to authenticate with the
authorization server by including the client\_id and client\_secret in the body of the HTTP request\.

```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')
### Methods

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

Asynchronously tries to authenticate a client based on credentials \(client\_id and client\_secret\) provided in the request body\.
The method delegates to [Abblix\.Oidc\.Server\.Features\.ClientAuthentication\.ClientSecretAuthenticator\.TryAuthenticateAsync\(System\.String,System\.String,System\.String\)](https://learn.microsoft.com/en-us/dotnet/api/abblix.oidc.server.features.clientauthentication.clientsecretauthenticator.tryauthenticateasync#abblix-oidc-server-features-clientauthentication-clientsecretauthenticator-tryauthenticateasync(system-string-system-string-system-string) 'Abblix\.Oidc\.Server\.Features\.ClientAuthentication\.ClientSecretAuthenticator\.TryAuthenticateAsync\(System\.String,System\.String,System\.String\)') with the extracted client\_id and client\_secret\.

```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.ClientSecretPostAuthenticator.TryAuthenticateClientAsync(Abblix.Oidc.Server.Model.ClientRequest).request}

The client request containing the client\_id and client\_secret for authentication\.

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 [System\.Threading\.Tasks\.Task](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task 'System\.Threading\.Tasks\.Task') representing the asynchronous operation, which upon completion will yield 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') or null if authentication fails\.
