faas-node-gatekeeper

Checks that your FaaS messagew are properly signed and hashed

Usage no npm install needed!

<script type="module">
  import faasNodeGatekeeper from 'https://cdn.skypack.dev/faas-node-gatekeeper';
</script>

README

Gatekeeper

How to use:

const GateKeeper = require("faas-node-gatekeeper");

GateKeeper.validate(
  message,             // {String} The body of the request
  "payload-secret"     // {String} The name of the secret variable
  )
  .then(isValid => {
      if (!isValid) {
        callback(undefined, {
          status: "Error, your message could not be validated"
        });
        return;
      }

      // All your logic here!
  })

Step by step guide: