Socket
Socket
Sign inDemoInstall

pingpp-verifier

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pingpp-verifier

helper to verify pingpp webhook message


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

npm download npm version

verifier for Ping++ webhook message

Document

See Ping++ webhook

Installation

$ npm install pingpp-verifier

General Usage

var pingppVerifier = require('pingpp-verifier');

// the public key could be a file path or a String
const publicKey = 'your key';
const publicKey = '/path/to/pub.pem';

// Integrate with your program
const verify = pingppVerifier.Verifier(publicKey);
verify(body, signature);

// Express middleware
router.use(
  '/webhook',
  bodyParser.raw({
    type: '*/*'
  }),
  pingppVerifier.ExpressPingppVerifier(publicKey));

// Also you could modify the refuse message if you want
// Below is the default reply (400 with '' body)
pingppVerifier.ExpressPingppVerifier(publicKey, 400, '')

// Express middleware with bypass
// if you send a request with header 'bypass-signature', it will skip the check
router.use(
  '/webhook',
  bodyParser.raw({
    type: '*/*'
  }),
  pingppVerifier.ExpressPingppVerifierTest(publicKey));

License

license

Keywords

FAQs

Last updated on 30 Apr 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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