Socket
Socket
Sign inDemoInstall

node-spark-webhook

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "node-spark-webhook",
"version": "1.0.0",
"version": "1.0.1",
"description": "Cisco Spark API Webhook Utility Library for Node JS.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -27,3 +27,3 @@ # node-spark-webhook

// add route for path that which is listening for web hooks
app.post('/spark', webhook.listen);
app.post('/spark', webhook.listen());

@@ -64,9 +64,9 @@ // start express server

`webhook.listen(req [, res, next])`
`webhook.listen()`
Processes an incoming web hook and emits an event once validated. This only needs the `request` object passed to it, but if a `response` object or `next` function is passed, it will handle those appropriately.
Returns a function with properties `req`, `res`, and `next`. When embedded in a connect based web app such as express.js, allows easy processing and validation (including HMAC if secret is specified) of an incoming web hook. Once validated, emits events based on the web hook's `resource` value.
`webhook.auth(payload, signature, secret [, callback]))`
Should you simply need to authenticate webhook, you can access the `auth` function directly.
Should you simply need to authenticate a web hook, you can access the `auth` function directly.

@@ -92,3 +92,3 @@ - `payload` : request body in JSON or string format

Additionally, a more generic event named "request" is triggered on every validated webhook. This event returns a single property that contains the request `body` as an object. For example:
Additionally, a more generic event named "request" is triggered on every validated web hook. This event returns a single property that contains the request `body` as an object. For example:

@@ -95,0 +95,0 @@ ```js

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc