#### [Abblix\.SecurityEvents](https://www.abblix.com/en/docs/api/abblix-securityevents 'index')
### [Abblix\.SecurityEvents\.Abstractions](https://www.abblix.com/en/docs/api/abblix-securityevents/Abblix.SecurityEvents.Abstractions 'Abblix\.SecurityEvents\.Abstractions')

## ISecurityEventTokenVerifier Interface

Verifies a SET's signature and yields the token whose claims are thereby the issuer's words:
the bridge between the validation pipeline and whatever cryptography the host runs\.

```csharp
public interface ISecurityEventTokenVerifier
```

Derived  
↳ [DefaultSecurityEventTokenVerifier](https://www.abblix.com/en/docs/api/abblix-securityevents/Abblix.SecurityEvents.Infrastructure.DefaultSecurityEventTokenVerifier 'Abblix\.SecurityEvents\.Infrastructure\.DefaultSecurityEventTokenVerifier')

### Remarks
The verifier owns key resolution and the algorithm allowlist, and it reports failures already
in this package's error vocabulary, because only the implementation can tell a signature that
does not verify from a key that was not found \- the distinction a receiver acts on, since a
key miss may heal after refetching the issuer's keys and a bad signature never does\. Every
check beyond the signature \- typing, audience, freshness \- belongs to the pipeline's steps,
where a profile can see and compose it\.
### Methods

## ISecurityEventTokenVerifier\.VerifyAsync\(string, string, CancellationToken\) Method {#Abblix.SecurityEvents.Abstractions.ISecurityEventTokenVerifier.VerifyAsync(string,string,System.Threading.CancellationToken)}

Verifies the token's signature\.

```csharp
System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Jwt.JsonWebToken,Abblix.SecurityEvents.Validation.SecurityEventTokenValidationError>> VerifyAsync(string compactToken, string? keyId=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
```
#### Parameters

###### `compactToken` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.SecurityEvents.Abstractions.ISecurityEventTokenVerifier.VerifyAsync(string,string,System.Threading.CancellationToken).compactToken}

The token as received, in compact serialization\.

###### `keyId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.SecurityEvents.Abstractions.ISecurityEventTokenVerifier.VerifyAsync(string,string,System.Threading.CancellationToken).keyId}

The "kid" the token's header names, when the caller has already parsed it \- the signature
step has \- so a caching key resolver can recognise a rollover without re\-parsing the
token\.

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.SecurityEvents.Abstractions.ISecurityEventTokenVerifier.VerifyAsync(string,string,System.Threading.CancellationToken).cancellationToken}

Cancels key retrieval mid\-flight\.

#### 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://www.abblix.com/en/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[JsonWebToken](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebToken 'Abblix\.Jwt\.JsonWebToken')[,](https://www.abblix.com/en/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[SecurityEventTokenValidationError](https://www.abblix.com/en/docs/api/abblix-securityevents/Abblix.SecurityEvents.Validation.SecurityEventTokenValidationError 'Abblix\.SecurityEvents\.Validation\.SecurityEventTokenValidationError')[&gt;](https://www.abblix.com/en/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
The parsed token on success \- claims now carrying the issuer's authority \- or the error a
receiver branches on\.
