Table of Contents

Interface ILiveKitTokenVerifier

Namespace
LiveKit.Authentication
Assembly
LiveKit.AspNetCore.ServerSdk.Abstractions.dll

Service for verifying LiveKit JWT tokens.

Validates JWT tokens by checking the signature, issuer (API key), and expiration time. Used internally by the webhook receiver to verify incoming webhook requests.

public interface ILiveKitTokenVerifier

Methods

VerifyAsync(string, TimeSpan?, CancellationToken)

Verifies a LiveKit JWT token and extracts its claims.

Validation includes: - Signature verification using the API secret - Issuer (API key) validation - Expiration time check with configurable clock tolerance

Task<IDictionary<string, string>> VerifyAsync(string token, TimeSpan? clockTolerance = null, CancellationToken cancellationToken = default)

Parameters

token string

The JWT token to verify.

clockTolerance TimeSpan?

Optional clock tolerance for expiration validation. If not specified, uses the configured webhook clock tolerance.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IDictionary<string, string>>

A dictionary of claims extracted from the token, with claim names as keys.

Exceptions

ArgumentException

Thrown when the token is null or empty.

Exception

Thrown when token validation fails (e.g. SecurityTokenExpiredException, SecurityTokenInvalidSignatureException).