Skip to content

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.

C#
public interface ISecurityEventTokenVerifier

Derived
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

Verifies the token's signature.

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

The token as received, in compact serialization.

keyId System.String

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

Cancels key retrieval mid-flight.

Returns

System.Threading.Tasks.Task<Abblix.Utils.Result<JsonWebToken,SecurityEventTokenValidationError>>
The parsed token on success - claims now carrying the issuer's authority - or the error a receiver branches on.