interface webhook_service_interface

Webhook Service Interface.

Handles incoming webhooks, including authentication and dispatching.

Methods

bool
validate_signature(string $payload, string $signature, string $secret, string $algo = 'sha256')

Validate an incoming webhook signature using HMAC.

Details

at line 37
bool validate_signature(string $payload, string $signature, string $secret, string $algo = 'sha256')

Validate an incoming webhook signature using HMAC.

Parameters

string $payload

The raw request body

string $signature

The signature provided in the header

string $secret

The shared secret key

string $algo

The hashing algorithm (default: sha256)

Return Value

bool