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

## IAuthServiceJwtValidator Interface

Validates JWTs minted by this authorization server itself \(its own access tokens, refresh
tokens and Registration Access Tokens\), checking signature against the server's signing
keys, issuer equality, and audience membership against the configured client registry\.

```csharp
public interface IAuthServiceJwtValidator
```

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

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

Asynchronously validates a JSON Web Token \(JWT\) based on the provided validation options\.
This method ensures that the JWT is correctly formatted, signed, and adheres to the expected claims and audience\.

```csharp
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.IAuthServiceJwtValidator.ValidateAsync(string,Abblix.Jwt.ValidationOptions).jwt}

The JWT string to be validated\.

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

The validation options that control how the JWT is validated, including checks for issuer,
            audience, expiration, and more\. Defaults to [Default](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.ValidationOptions#Abblix.Jwt.ValidationOptions.Default 'Abblix\.Jwt\.ValidationOptions\.Default') if not specified\.

#### 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 operation, resulting in a Result containing either a validated JsonWebToken or a JwtValidationError\.
