emarref avatar
HttpMiddlewareRequireValidHmacSignature
@emarref
Script
Middleware to ensure the signed request is valid. export default chain() .then(add(requireValidHmacSignature({ // The secret value shared between you and the originating party signingKey: "my_super_secret_key", // The name of the header containing the signature to compare with our value signatureHeaderName: "x-signature", }))) .then(send())
emarref avatar
HttpMiddlewareChain
@emarref
Script
An implementation of chainable http middleware. Wrap your http handlers in middleware to add functionality and reduce code duplication. export default function chain() .then(add(requireHttpMethod("post"))) .then(add(requireAuthentication())) .then(send())
emarref avatar
HttpMiddlewareRequireHttpMethod
@emarref
Script
Middleware to ensure your http handler is called with the specific http method. export default chain() .then(add(requireHttpMethod("post"))) .then(send())
1
Next
June 14, 2024