Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dingtalk_suite_callback

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dingtalk_suite_callback

nodejs版钉钉ISV套件回调server

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

dd_suite_callback

dingtalk express 中间件。自动验证回调URL有效性。 Demo

var dd_suite_callback = require('dd_suite_callback');
var config = {
  token: 'xxxxxxxxx',
  encodingAESKey: 'xxxxxxxxxxxxxxxxxxx',
  suiteid: 'xxxxxxxxxxxx' //第一次验证没有不用填
}

app.post('/dd_suite_callback', dd_suite_callback(config, 
  function(message, req, res, next){
    console.log('message', message);
    switch (message.EventType) {
      case 'suite_ticket': //ticket,间隔20分。
        /*{
            EventType: 'suite_ticket',
            SuiteKey: 'suitexpiygdnz51hsbbhj',
            SuiteTicket: 'wrEooJqhQlNcWU327mtr20yzWkPtea9LOm0P8w2M3MDjRPUYY5Tu9fspDhZ8HPXeP5yzKuorHIQ0P9GSU5evAc',
            TimeStamp: '1452328049089'
          }*/
        res.reply();
        break;

      case 'tmp_auth_code': //企业号临时授权码
        res.reply();
        break;

      case 'change_auth': //授权变更消息
        res.reply();
        break;
      case 'suite_relieve': //解除授权消息
        res.reply();
        break;
      default:
        message.name = 'ddtalk unknow EventType';
        next(message);
    }
});

Keywords

FAQs

Package last updated on 09 Jan 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc