JSON: include another signature header
commit55959c2890a149d565aba9474b4e0fe31e71fee0
authorKyle J. McKay <mackyle@gmail.com>
Sun, 14 Feb 2021 19:19:07 +0000 (14 12:19 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Sun, 14 Feb 2021 19:19:07 +0000 (14 12:19 -0700)
treef867f819946c2e9a9f0e4f74bd6e02bef373f997
parent598af3ecbd3d9a705ee3d1e03cffe3a39cdfc685
JSON: include another signature header

If a "secret" has been set, compute and include an additional
signature header with the JSON POST push notification.

The signature is not complicated, it's simply the lowercase
hexadecimal representation of the HMAC as described in RFC 2104
<https://tools.ietf.org/html/rfc2104> where the "secret" provides
the "secret key K" and the body of the POST provides the "data
'text'" for the computation.

With this addition the original SHA1-based HMAC signature continues
to be included but now too an additional SHA256-based HMAC signature.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Girocco/Notify.pm