func HeaderVerification ¶
func HeaderVerification(config Config, skipper middleware.Skipper) echo.MiddlewareFunc
HeaderVerification is a verification middleware that only allows requests that are verified to originate from Clubhouse when generated with a secret. From https://clubhouse.io/api/webhook/v1/#Signature: If you provide a secret when you create the Outgoing Webhook, it will include an HTTP header named Clubhouse-Signature. The value of this header is a cryptographic hash encoded in hexadecimal.
The signature is computed by the HMAC-SHA-256 algorithm. The ‘message’ is the HTTP request body encoded in UTF-8. The ‘secret’ is the secret string you provided, also encoded in UTF-8.