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

## IRevocationHandler Interface

Defines a contract for handling revocation requests for access or refresh tokens as per OAuth 2\.0 Token Revocation
specifications\.  Ensures implementations can securely validate and process such requests to revoke tokens effectively\.

```csharp
public interface IRevocationHandler
```

Derived  
↳ [RevocationHandler](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Revocation.RevocationHandler 'Abblix\.Oidc\.Server\.Endpoints\.Revocation\.RevocationHandler')
### Methods

## IRevocationHandler\.HandleAsync\(RevocationRequest, ClientRequest\) Method {#Abblix.Oidc.Server.Endpoints.Revocation.Interfaces.IRevocationHandler.HandleAsync(Abblix.Oidc.Server.Model.RevocationRequest,Abblix.Oidc.Server.Model.ClientRequest)}

Asynchronously handles a token revocation request by validating and then processing it to revoke
the specified token\.

```csharp
System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Oidc.Server.Endpoints.Revocation.Interfaces.TokenRevoked,Abblix.Oidc.Server.Common.OidcError>> HandleAsync(Abblix.Oidc.Server.Model.RevocationRequest revocationRequest, Abblix.Oidc.Server.Model.ClientRequest clientRequest);
```
#### Parameters

###### `revocationRequest` [RevocationRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.RevocationRequest 'Abblix\.Oidc\.Server\.Model\.RevocationRequest') {#Abblix.Oidc.Server.Endpoints.Revocation.Interfaces.IRevocationHandler.HandleAsync(Abblix.Oidc.Server.Model.RevocationRequest,Abblix.Oidc.Server.Model.ClientRequest).revocationRequest}

The details of the revocation request, including the token to be revoked\.

###### `clientRequest` [ClientRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.ClientRequest 'Abblix\.Oidc\.Server\.Model\.ClientRequest') {#Abblix.Oidc.Server.Endpoints.Revocation.Interfaces.IRevocationHandler.HandleAsync(Abblix.Oidc.Server.Model.RevocationRequest,Abblix.Oidc.Server.Model.ClientRequest).clientRequest}

Additional information about the client making the revocation request,
            necessary for context\-specific validation\.

#### 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')[TokenRevoked](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Revocation.Interfaces.TokenRevoked 'Abblix\.Oidc\.Server\.Endpoints\.Revocation\.Interfaces\.TokenRevoked')[,](https://learn.microsoft.com/en-us/dotnet/api/abblix.utils.result-2 'Abblix\.Utils\.Result\`2')[OidcError](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.OidcError 'Abblix\.Oidc\.Server\.Common\.OidcError')[&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 [System\.Threading\.Tasks\.Task](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task 'System\.Threading\.Tasks\.Task') that resolves to a [Abblix\.Utils\.Result&lt;&gt;](https://learn.microsoft.com/en-us/dotnet/api/abblix.utils.result-2 'Abblix\.Utils\.Result\`2') containing either
[TokenRevoked](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Revocation.Interfaces.TokenRevoked 'Abblix\.Oidc\.Server\.Endpoints\.Revocation\.Interfaces\.TokenRevoked') on success or [OidcError](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.OidcError 'Abblix\.Oidc\.Server\.Common\.OidcError') on failure\.

### Remarks
This method is crucial for maintaining the security and integrity of the authorization server by allowing
clients to revoke tokens that are no longer needed or may have been compromised\.
Implementations must ensure that revocation requests are authenticated and authorized before proceeding
with token revocation, adhering to the OAuth 2\.0 Token Revocation specification \(RFC 7009\)\.
