Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebhookSignature

Utility to help calculate webhook signatures

Hierarchy

  • WebhookSignature

Index

Methods

Methods

Static calculate

  • calculate(body: Buffer, secret: string): Promise<string>
  • Calculates the signature for the provided webhook body and secret. If the same secret value held by Dynamic Content is used the signature will match the value sent as part of the notification. This can be used to verify the request was sent by a trusted party.

    Parameters

    • body: Buffer

      Raw response body bytes sent as part of the notification

    • secret: string

      Shared secret value previously set in Dynamic Content

    Returns Promise<string>

Generated using TypeDoc