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

## AuthServiceJwtValidator Class

Validates JSON Web Tokens \(JWTs\) issued by the authentication service, ensuring they are authentic and compliant
with the expected issuer, audience, and cryptographic signatures\.

```csharp
public class AuthServiceJwtValidator : Abblix.Oidc.Server.Features.Tokens.Validation.IAuthServiceJwtValidator
```

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

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

## AuthServiceJwtValidator\(IJsonWebTokenValidator, IClientInfoProvider, IIssuerProvider, IAuthServiceKeysProvider\) Constructor {#Abblix.Oidc.Server.Features.Tokens.Validation.AuthServiceJwtValidator.AuthServiceJwtValidator(Abblix.Jwt.IJsonWebTokenValidator,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider)}

Validates JSON Web Tokens \(JWTs\) issued by the authentication service, ensuring they are authentic and compliant
with the expected issuer, audience, and cryptographic signatures\.

```csharp
public AuthServiceJwtValidator(Abblix.Jwt.IJsonWebTokenValidator validator, Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider clientInfoProvider, Abblix.Oidc.Server.Features.Issuer.IIssuerProvider issuerProvider, Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider serviceKeysProvider);
```
#### Parameters

###### `validator` [IJsonWebTokenValidator](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.IJsonWebTokenValidator 'Abblix\.Jwt\.IJsonWebTokenValidator') {#Abblix.Oidc.Server.Features.Tokens.Validation.AuthServiceJwtValidator.AuthServiceJwtValidator(Abblix.Jwt.IJsonWebTokenValidator,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider).validator}

The service used to perform the 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.AuthServiceJwtValidator.AuthServiceJwtValidator(Abblix.Jwt.IJsonWebTokenValidator,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider).clientInfoProvider}

The provider used to retrieve information about clients during
            audience validation\.

###### `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.AuthServiceJwtValidator.AuthServiceJwtValidator(Abblix.Jwt.IJsonWebTokenValidator,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider).issuerProvider}

The provider used to resolve the expected issuer of the JWT\.

###### `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.AuthServiceJwtValidator.AuthServiceJwtValidator(Abblix.Jwt.IJsonWebTokenValidator,Abblix.Oidc.Server.Features.ClientInformation.IClientInfoProvider,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider).serviceKeysProvider}

The provider used to retrieve the cryptographic keys for signing and
            decrypting tokens\.
### Methods

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

Asynchronously validates a JWT, checking its authenticity, issuer, audience, and cryptographic signatures\.

```csharp
public System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Jwt.JsonWebToken,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.AuthServiceJwtValidator.ValidateAsync(string,Abblix.Jwt.ValidationOptions).jwt}

The JWT string 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.AuthServiceJwtValidator.ValidateAsync(string,Abblix.Jwt.ValidationOptions).options}

Validation options to apply\. Defaults to [Default](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.ValidationOptions#Abblix.Jwt.ValidationOptions.Default 'Abblix\.Jwt\.ValidationOptions\.Default')\.

Implements [ValidateAsync\(string, ValidationOptions\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Tokens.Validation.IAuthServiceJwtValidator#Abblix.Oidc.Server.Features.Tokens.Validation.IAuthServiceJwtValidator.ValidateAsync(string,Abblix.Jwt.ValidationOptions) 'Abblix\.Oidc\.Server\.Features\.Tokens\.Validation\.IAuthServiceJwtValidator\.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')[JsonWebToken](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebToken 'Abblix\.Jwt\.JsonWebToken')[,](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 representing the asynchronous validation operation, which yields a Result containing either a validated JsonWebToken or a JwtValidationError\.
