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

## TokenStatusValidatorDecorator Class

Enhances the functionality of an existing [IJsonWebTokenValidator](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.IJsonWebTokenValidator 'Abblix\.Jwt\.IJsonWebTokenValidator') by adding token revocation validation capabilities\.
This decorator checks whether the JSON Web Token \(JWT\) has been revoked or used before and, if so, invalidates the token\.
It utilizes an [ITokenRegistry](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.ITokenRegistry 'Abblix\.Oidc\.Server\.Features\.Storages\.ITokenRegistry') to check the token's status and an inner [IJsonWebTokenValidator](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.IJsonWebTokenValidator 'Abblix\.Jwt\.IJsonWebTokenValidator')
for initial token validation\.

```csharp
public class TokenStatusValidatorDecorator : Abblix.Jwt.IJsonWebTokenValidator
```

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

Implements [IJsonWebTokenValidator](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.IJsonWebTokenValidator 'Abblix\.Jwt\.IJsonWebTokenValidator')
### Constructors

## TokenStatusValidatorDecorator\(ITokenRegistry, IJsonWebTokenValidator\) Constructor {#Abblix.Oidc.Server.Features.Tokens.Revocation.TokenStatusValidatorDecorator.TokenStatusValidatorDecorator(Abblix.Oidc.Server.Features.Storages.ITokenRegistry,Abblix.Jwt.IJsonWebTokenValidator)}

Enhances the functionality of an existing [IJsonWebTokenValidator](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.IJsonWebTokenValidator 'Abblix\.Jwt\.IJsonWebTokenValidator') by adding token revocation validation capabilities\.
This decorator checks whether the JSON Web Token \(JWT\) has been revoked or used before and, if so, invalidates the token\.
It utilizes an [ITokenRegistry](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.ITokenRegistry 'Abblix\.Oidc\.Server\.Features\.Storages\.ITokenRegistry') to check the token's status and an inner [IJsonWebTokenValidator](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.IJsonWebTokenValidator 'Abblix\.Jwt\.IJsonWebTokenValidator')
for initial token validation\.

```csharp
public TokenStatusValidatorDecorator(Abblix.Oidc.Server.Features.Storages.ITokenRegistry tokenRegistry, Abblix.Jwt.IJsonWebTokenValidator innerValidator);
```
#### Parameters

###### `tokenRegistry` [ITokenRegistry](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.ITokenRegistry 'Abblix\.Oidc\.Server\.Features\.Storages\.ITokenRegistry') {#Abblix.Oidc.Server.Features.Tokens.Revocation.TokenStatusValidatorDecorator.TokenStatusValidatorDecorator(Abblix.Oidc.Server.Features.Storages.ITokenRegistry,Abblix.Jwt.IJsonWebTokenValidator).tokenRegistry}

The token registry used to check token status\.

###### `innerValidator` [IJsonWebTokenValidator](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.IJsonWebTokenValidator 'Abblix\.Jwt\.IJsonWebTokenValidator') {#Abblix.Oidc.Server.Features.Tokens.Revocation.TokenStatusValidatorDecorator.TokenStatusValidatorDecorator(Abblix.Oidc.Server.Features.Storages.ITokenRegistry,Abblix.Jwt.IJsonWebTokenValidator).innerValidator}

The inner validator for initial token validation\.
### Properties

## TokenStatusValidatorDecorator\.EncryptionAlgorithmsSupported Property {#Abblix.Oidc.Server.Features.Tokens.Revocation.TokenStatusValidatorDecorator.EncryptionAlgorithmsSupported}

Forwards the JWE key\-management algorithms accepted by the inner validator; revocation checking
does not influence which encryption algorithms are supported\.

```csharp
public System.Collections.Generic.IEnumerable<string> EncryptionAlgorithmsSupported { get; }
```

Implements [EncryptionAlgorithmsSupported](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.IJsonWebTokenValidator#Abblix.Jwt.IJsonWebTokenValidator.EncryptionAlgorithmsSupported 'Abblix\.Jwt\.IJsonWebTokenValidator\.EncryptionAlgorithmsSupported')

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

## TokenStatusValidatorDecorator\.EncryptionMethodsSupported Property {#Abblix.Oidc.Server.Features.Tokens.Revocation.TokenStatusValidatorDecorator.EncryptionMethodsSupported}

Forwards the JWE content\-encryption algorithms accepted by the inner validator; revocation checking
does not influence which encryption algorithms are supported\.

```csharp
public System.Collections.Generic.IEnumerable<string> EncryptionMethodsSupported { get; }
```

Implements [EncryptionMethodsSupported](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.IJsonWebTokenValidator#Abblix.Jwt.IJsonWebTokenValidator.EncryptionMethodsSupported 'Abblix\.Jwt\.IJsonWebTokenValidator\.EncryptionMethodsSupported')

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

## TokenStatusValidatorDecorator\.SigningAlgorithmsSupported Property {#Abblix.Oidc.Server.Features.Tokens.Revocation.TokenStatusValidatorDecorator.SigningAlgorithmsSupported}

Forwards the set of JWS signing algorithms accepted by the inner validator \(RFC 7518 §3\.1
names such as `RS256`, `PS256`, `ES256`\); revocation checking does not
influence which algorithms are supported\.

```csharp
public System.Collections.Generic.IEnumerable<string> SigningAlgorithmsSupported { get; }
```

Implements [SigningAlgorithmsSupported](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.IJsonWebTokenValidator#Abblix.Jwt.IJsonWebTokenValidator.SigningAlgorithmsSupported 'Abblix\.Jwt\.IJsonWebTokenValidator\.SigningAlgorithmsSupported')

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

## TokenStatusValidatorDecorator\.ValidateAsync\(string, ValidationParameters\) Method {#Abblix.Oidc.Server.Features.Tokens.Revocation.TokenStatusValidatorDecorator.ValidateAsync(string,Abblix.Jwt.ValidationParameters)}

Validates a JSON Web Token \(JWT\) and checks its revocation status\.

```csharp
public System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Jwt.JsonWebToken,Abblix.Jwt.JwtValidationError>> ValidateAsync(string jwt, Abblix.Jwt.ValidationParameters parameters);
```
#### Parameters

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

The JWT to be validated\.

###### `parameters` [ValidationParameters](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.ValidationParameters 'Abblix\.Jwt\.ValidationParameters') {#Abblix.Oidc.Server.Features.Tokens.Revocation.TokenStatusValidatorDecorator.ValidateAsync(string,Abblix.Jwt.ValidationParameters).parameters}

Validation parameters to use during validation\.

Implements [ValidateAsync\(string, ValidationParameters\)](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.IJsonWebTokenValidator#Abblix.Jwt.IJsonWebTokenValidator.ValidateAsync(string,Abblix.Jwt.ValidationParameters) 'Abblix\.Jwt\.IJsonWebTokenValidator\.ValidateAsync\(System\.String,Abblix\.Jwt\.ValidationParameters\)')

#### 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 Result containing either a validated JsonWebToken or a JwtValidationError\.
If the token is revoked or already used, it returns a JwtValidationError\.
Otherwise, it returns the result from the inner validator\.
