basalt / subscriptions/src / requireWebhookSecret
Function: requireWebhookSecret()
> requireWebhookSecret(gateway, secret): string
Defined in: subscriptions/src/gateway.ts:32
Returns the configured webhook signing secret, or throws WebhookSecretMissingError when it is absent, empty or whitespace — an empty HMAC key is public knowledge, so "verifying" with it would accept forgeries. Built-in drivers call this before every verification (fail closed).
Parameters
gateway
string
secret
string | null | undefined
Returns
string