WebhookHandler

Processes incoming webhook payloads with optional HMAC-SHA256 signature verification and event-specific handlers.

Functions

Link copied to clipboard
suspend fun handle(headers: Map<String, String>, body: String): Boolean

Verifies and dispatches a webhook payload to the appropriate event handler. Returns false if signature verification fails.

Link copied to clipboard
fun verify(headers: Map<String, String>, body: String): Boolean

Verifies the HMAC-SHA256 signature of a webhook payload. Returns true if valid or if no signing secret is configured.