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

## ClientJwtValidator Class

Validates JWTs issued by clients to the authentication service, supporting scenarios such as private JWT client
authentication and the validation of request objects\. This class plays a crucial role in ensuring that
tokens received from clients are legitimate, properly signed, and authorized for use within
the authentication service\.

```csharp
public class ClientJwtValidator : Abblix.Oidc.Server.Features.Tokens.Validation.IClientJwtValidator
```

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

Implements [IClientJwtValidator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Tokens.Validation.IClientJwtValidator 'Abblix\.Oidc\.Server\.Features\.Tokens\.Validation\.IClientJwtValidator')

### Remarks
The class is used for validating tokens like client authentication JWTs and request objects in OpenID Connect
flows\. It checks the authenticity of the JWT issuer, audience, and cryptographic signatures to ensure that
only valid and authorized clients can interact with the authentication service\.
### Constructors

## ClientJwtValidator\(ILogger\<ClientJwtValidator\>, IRequestInfoProvider, IJsonWebTokenValidator, IClientInfoProvider, IClientKeysProvider, IIssuerProvider, IAuthServiceKeysProvider\) Constructor {#Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator.ClientJwtValidator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator_,Abblix.Oidc.Server.Common.Interfaces.IRequestInfoProvider,Abblix.Jwt.IJsonWebTokenValidator,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,Abblix.Oidc.Server.Features.ClientInformation.IClientKeysProvider,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider)}

Validates JWTs issued by clients to the authentication service, supporting scenarios such as private JWT client
authentication and the validation of request objects\. This class plays a crucial role in ensuring that
tokens received from clients are legitimate, properly signed, and authorized for use within
the authentication service\.

```csharp
public ClientJwtValidator(Microsoft.Extensions.Logging.ILogger<Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator> logger, Abblix.Oidc.Server.Common.Interfaces.IRequestInfoProvider requestInfoProvider, Abblix.Jwt.IJsonWebTokenValidator tokenValidator, Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider clientInfoProvider, Abblix.Oidc.Server.Features.ClientInformation.IClientKeysProvider clientJwksProvider, Abblix.Oidc.Server.Features.Issuer.IIssuerProvider issuerProvider, Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider serviceKeysProvider);
```
#### 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')[ClientJwtValidator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator 'Abblix\.Oidc\.Server\.Features\.Tokens\.Validation\.ClientJwtValidator')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger-1 'Microsoft\.Extensions\.Logging\.ILogger\`1') {#Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator.ClientJwtValidator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator_,Abblix.Oidc.Server.Common.Interfaces.IRequestInfoProvider,Abblix.Jwt.IJsonWebTokenValidator,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,Abblix.Oidc.Server.Features.ClientInformation.IClientKeysProvider,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider).logger}

The logger used for recording validation activities and outcomes\.

###### `requestInfoProvider` [IRequestInfoProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Interfaces.IRequestInfoProvider 'Abblix\.Oidc\.Server\.Common\.Interfaces\.IRequestInfoProvider') {#Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator.ClientJwtValidator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator_,Abblix.Oidc.Server.Common.Interfaces.IRequestInfoProvider,Abblix.Jwt.IJsonWebTokenValidator,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,Abblix.Oidc.Server.Features.ClientInformation.IClientKeysProvider,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider).requestInfoProvider}

Provides information about the current request, including the request URI\.

###### `tokenValidator` [IJsonWebTokenValidator](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.IJsonWebTokenValidator 'Abblix\.Jwt\.IJsonWebTokenValidator') {#Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator.ClientJwtValidator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator_,Abblix.Oidc.Server.Common.Interfaces.IRequestInfoProvider,Abblix.Jwt.IJsonWebTokenValidator,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,Abblix.Oidc.Server.Features.ClientInformation.IClientKeysProvider,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider).tokenValidator}

The service used to perform core JWT validation\.

###### `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.Tokens.Validation.ClientJwtValidator.ClientJwtValidator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator_,Abblix.Oidc.Server.Common.Interfaces.IRequestInfoProvider,Abblix.Jwt.IJsonWebTokenValidator,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,Abblix.Oidc.Server.Features.ClientInformation.IClientKeysProvider,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider).clientInfoProvider}

Provides access to client information for validation purposes\.

###### `clientJwksProvider` [IClientKeysProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientInformation.IClientKeysProvider 'Abblix\.Oidc\.Server\.Features\.ClientInformation\.IClientKeysProvider') {#Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator.ClientJwtValidator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator_,Abblix.Oidc.Server.Common.Interfaces.IRequestInfoProvider,Abblix.Jwt.IJsonWebTokenValidator,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,Abblix.Oidc.Server.Features.ClientInformation.IClientKeysProvider,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider).clientJwksProvider}

Provides access to the client's JSON Web Keys \(JWKs\) for verifying signatures\.

###### `issuerProvider` [IIssuerProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Issuer.IIssuerProvider 'Abblix\.Oidc\.Server\.Features\.Issuer\.IIssuerProvider') {#Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator.ClientJwtValidator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator_,Abblix.Oidc.Server.Common.Interfaces.IRequestInfoProvider,Abblix.Jwt.IJsonWebTokenValidator,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,Abblix.Oidc.Server.Features.ClientInformation.IClientKeysProvider,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider).issuerProvider}

Provides the authorization server's issuer identifier for audience validation\.

###### `serviceKeysProvider` [IAuthServiceKeysProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider 'Abblix\.Oidc\.Server\.Common\.Interfaces\.IAuthServiceKeysProvider') {#Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator.ClientJwtValidator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator_,Abblix.Oidc.Server.Common.Interfaces.IRequestInfoProvider,Abblix.Jwt.IJsonWebTokenValidator,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,Abblix.Oidc.Server.Features.ClientInformation.IClientKeysProvider,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider).serviceKeysProvider}

Provides the server's own private keys used to decrypt request
            objects that the client encrypted to the server \(RFC 9101 §6\.1\)\.

### Remarks
The class is used for validating tokens like client authentication JWTs and request objects in OpenID Connect
flows\. It checks the authenticity of the JWT issuer, audience, and cryptographic signatures to ensure that
only valid and authorized clients can interact with the authentication service\.
### Methods

## ClientJwtValidator\.ValidateAsync\(string, ValidationOptions\) Method {#Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator.ValidateAsync(string,Abblix.Jwt.ValidationOptions)}

Validates the JWT issued by a client, ensuring that it meets the expected criteria for issuer, audience,
and cryptographic signatures\. This method is used in scenarios such as private JWT client authentication
and request object validation\.

```csharp
public System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Oidc.Server.Features.Tokens.Validation.ValidJsonWebToken,Abblix.Jwt.JwtValidationError>> ValidateAsync(string jwt, Abblix.Jwt.ValidationOptions options=Abblix.Jwt.ValidationOptions.Default);
```
#### Parameters

###### `jwt` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator.ValidateAsync(string,Abblix.Jwt.ValidationOptions).jwt}

The JWT to validate\.

###### `options` [ValidationOptions](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.ValidationOptions 'Abblix\.Jwt\.ValidationOptions') {#Abblix.Oidc.Server.Features.Tokens.Validation.ClientJwtValidator.ValidateAsync(string,Abblix.Jwt.ValidationOptions).options}

Options to customize the validation process\.

Implements [ValidateAsync\(string, ValidationOptions\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Tokens.Validation.IClientJwtValidator#Abblix.Oidc.Server.Features.Tokens.Validation.IClientJwtValidator.ValidateAsync(string,Abblix.Jwt.ValidationOptions) 'Abblix\.Oidc\.Server\.Features\.Tokens\.Validation\.IClientJwtValidator\.ValidateAsync\(string, Abblix\.Jwt\.ValidationOptions\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[Abblix\.Utils\.Result&lt;](https://learn.microsoft.com/en-us/dotnet/api/abblix.utils.result-2 'Abblix\.Utils\.Result\`2')[ValidJsonWebToken](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Tokens.Validation.ValidJsonWebToken 'Abblix\.Oidc\.Server\.Features\.Tokens\.Validation\.ValidJsonWebToken')[,](https://learn.microsoft.com/en-us/dotnet/api/abblix.utils.result-2 'Abblix\.Utils\.Result\`2')[JwtValidationError](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JwtValidationError 'Abblix\.Jwt\.JwtValidationError')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/abblix.utils.result-2 'Abblix\.Utils\.Result\`2')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
A task that returns a Result containing either a ValidJsonWebToken on success,
or a JwtValidationError on failure\.
