Signing Webhooks
A recommended practice for Webhooks is to sign the payloads of the messages so that the receiver can verify the authenticity and integrity of the message.
The framework provides a mechanism to sign the payloads of the messages sent (as Sender) and to verify the signatures of the incoming messages (as Receiver).
Signature providers are implementations that use the payload of a webhook message and a secret key, to compute a signature to be attached to the webhook, by implementing the IWebhookSigner
service contract.
By default, when registering a Webhook Sender service, the framework also registers an implementation of a signature provider for the 'HMAC-SHA-256' algorithm: it is possible to add custom ones by calling the method .AddSigner<TSigner>()
of the service builder.
Last updated
Was this helpful?