
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
dingtalk_suite_callback
Advanced tools
express中间件。自动验证回调URL有效性。
配合另一个项目:主动调用API dingtalk_suite 使用。
##安装
npm install dingtalk_suite_callback
使用方法:
var dd_suite_callback = require('dingtalk_suite_callback');
var config = {
token: 'xxxxxxxxx',
encodingAESKey: 'xxxxxxxxxxxxxxxxxxx',
suiteid: 'xxxxxxxxxxxx', //第一次验证没有不用填
saveTicket: function(data, callback){//可选,和主动调用API: dingtalk_suite 配合使用。
//data:{value: ticket字符串, expires:到期时间,钉钉回调时间戳 + 20分钟}
fs.writeFile(this.suiteid + 'ticket.txt',JSON.stringify(data), callback);
}
}
app.post('/dd_suite_callback', dd_suite_callback(config,
function(message, req, res, next){
console.log('message', message);
switch (message.EventType) {
case 'tmp_auth_code': //企业号临时授权码
/*{ AuthCode: '6b4294d637a0387eb36e6785451ff845',
EventType: 'tmp_auth_code',
SuiteKey: 'suitexpiycccccccccchj',
TimeStamp: '1452665779818' }*/
//使用 dingtalk_suite 获取永久授权码
res.reply();
break;
case 'change_auth': //授权变更消息
res.reply();
break;
case 'suite_relieve': //解除授权消息
/*{ AuthCorpId: 'ding5bfeb97afcccb984',
EventType: 'suite_relieve',
SuiteKey: 'suitexpiycccccccccchj',
TimeStamp: '1452665774168' }*/
res.reply();
break;
case 'suite_ticket': //ticket,间隔20分。如果有config.saveTicket 不会触发。
/*{ EventType: 'suite_ticket',
SuiteKey: 'suitexpiycccccccccchj',
SuiteTicket: 'wrEooJqhQlNcWU327mtr20yzWkPtea9LOm0P8w2M3MDjRPUYY5Tu9fspDhZ8HPXeP5yzKuorHIQ0P9GSU5evAc',
TimeStamp: '1452328049089'}*/
res.reply();
break;
default:
message.name = 'ddtalk unknow EventType';
next(message);
}
}));
FAQs
nodejs版钉钉ISV套件回调server
We found that dingtalk_suite_callback demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.