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

## DefaultSecurityEventTokenVerifier Class

The out\-of\-the\-box verifier: signature verification through the Abblix JWT core, with keys
from the issuer resolver\.

```csharp
public sealed class DefaultSecurityEventTokenVerifier : Abblix.SecurityEvents.Abstractions.ISecurityEventTokenVerifier
```

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

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

### Remarks
The core is asked for exactly the signature \- a signed token, verified against the issuer's
keys \- and nothing more: issuer allowlisting, audience, freshness and typing are pipeline
steps, and letting the core re\-check them would report their failures in the wrong vocabulary
from the wrong place\. An issuer the resolver yields no keys for is reported as a key miss
rather than a bad signature, because a refetch may heal the former and never the latter\.
### Constructors

## DefaultSecurityEventTokenVerifier\(IJsonWebTokenValidator, IIssuerKeyResolver, string\[\]\) Constructor {#Abblix.SecurityEvents.Infrastructure.DefaultSecurityEventTokenVerifier.DefaultSecurityEventTokenVerifier(Abblix.Jwt.IJsonWebTokenValidator,Abblix.SecurityEvents.Abstractions.IIssuerKeyResolver,string[])}

The out\-of\-the\-box verifier: signature verification through the Abblix JWT core, with keys
from the issuer resolver\.

```csharp
public DefaultSecurityEventTokenVerifier(Abblix.Jwt.IJsonWebTokenValidator validator, Abblix.SecurityEvents.Abstractions.IIssuerKeyResolver keyResolver, string[] allowedAlgorithms);
```
#### Parameters

###### `validator` [IJsonWebTokenValidator](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.IJsonWebTokenValidator 'Abblix\.Jwt\.IJsonWebTokenValidator') {#Abblix.SecurityEvents.Infrastructure.DefaultSecurityEventTokenVerifier.DefaultSecurityEventTokenVerifier(Abblix.Jwt.IJsonWebTokenValidator,Abblix.SecurityEvents.Abstractions.IIssuerKeyResolver,string[]).validator}

The JWT core's validator\.

###### `keyResolver` [IIssuerKeyResolver](https://www.abblix.com/en/docs/api/abblix-securityevents/Abblix.SecurityEvents.Abstractions.IIssuerKeyResolver 'Abblix\.SecurityEvents\.Abstractions\.IIssuerKeyResolver') {#Abblix.SecurityEvents.Infrastructure.DefaultSecurityEventTokenVerifier.DefaultSecurityEventTokenVerifier(Abblix.Jwt.IJsonWebTokenValidator,Abblix.SecurityEvents.Abstractions.IIssuerKeyResolver,string[]).keyResolver}

The receiver's key trust\.

###### `allowedAlgorithms` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array') {#Abblix.SecurityEvents.Infrastructure.DefaultSecurityEventTokenVerifier.DefaultSecurityEventTokenVerifier(Abblix.Jwt.IJsonWebTokenValidator,Abblix.SecurityEvents.Abstractions.IIssuerKeyResolver,string[]).allowedAlgorithms}

What this deployment will accept a signature under\. Stated rather
            than inherited: without it the accepted set is whatever the validator happens to permit, which is a
            policy nobody wrote and nobody can read off the configuration\.

### Remarks
The core is asked for exactly the signature \- a signed token, verified against the issuer's
keys \- and nothing more: issuer allowlisting, audience, freshness and typing are pipeline
steps, and letting the core re\-check them would report their failures in the wrong vocabulary
from the wrong place\. An issuer the resolver yields no keys for is reported as a key miss
rather than a bad signature, because a refetch may heal the former and never the latter\.
### Methods

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

Verifies the token's signature\.

```csharp
public 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.Infrastructure.DefaultSecurityEventTokenVerifier.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.Infrastructure.DefaultSecurityEventTokenVerifier.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.Infrastructure.DefaultSecurityEventTokenVerifier.VerifyAsync(string,string,System.Threading.CancellationToken).cancellationToken}

Cancels key retrieval mid\-flight\.

Implements [VerifyAsync\(string, string, CancellationToken\)](https://www.abblix.com/en/docs/api/abblix-securityevents/Abblix.SecurityEvents.Abstractions.ISecurityEventTokenVerifier#Abblix.SecurityEvents.Abstractions.ISecurityEventTokenVerifier.VerifyAsync(string,string,System.Threading.CancellationToken) 'Abblix\.SecurityEvents\.Abstractions\.ISecurityEventTokenVerifier\.VerifyAsync\(string, string, System\.Threading\.CancellationToken\)')

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