UNPKG

@hookflo/tern

Version:

A robust, scalable webhook verification framework supporting multiple platforms and signature algorithms

10 lines (9 loc) 431 B
import { WebhookVerificationResult } from "../types"; export declare abstract class WebhookVerifier { protected secret: string; protected toleranceInSeconds: number; constructor(secret: string, toleranceInSeconds?: number); abstract verify(request: Request): Promise<WebhookVerificationResult>; protected isTimestampValid(timestamp: number): boolean; protected safeCompare(a: string, b: string): boolean; }