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

## ClientSecretBasicAuthenticator Class

Implements an authentication of a client request by HTTP 'Authorization' header using the 'Basic' scheme\.
This authentication method follows the standards outlined in RFC 7617\.

```csharp
public class ClientSecretBasicAuthenticator : 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') → ClientSecretBasicAuthenticator

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

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

Implements an authentication of a client request by HTTP 'Authorization' header using the 'Basic' scheme\.
This authentication method follows the standards outlined in RFC 7617\.

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

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

Specifies the client authentication method this authenticator supports, which is 'client\_secret\_basic'\.
This indicates that the authenticator handles client authentication using the Basic Authentication scheme,
as defined in RFC 7617, where the client ID and secret are passed in the 'Authorization' header
encoded in Base64 format\.

```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

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

Tries to authenticate a client based on the 'Basic' authentication scheme\.
This method extracts the Base64\-encoded credentials from the 'Authorization' header of the request, decodes them,
and attempts to authenticate the client using the extracted credentials\.
It adheres to the user\-id and password format as outlined in RFC 7617, Section 2\.1, where the first colon in the
credentials string separates the user\-id \(client ID\) and the password \(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.ClientSecretBasicAuthenticator.TryAuthenticateClientAsync(Abblix.Oidc.Server.Model.ClientRequest).request}

The client request containing the authentication information in the 'Authorization' header\.

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\.
If the 'Authorization' header is missing, malformed, or does not follow the Basic authentication scheme,
the method returns null\.
