Skip to content

yourtion/node-cmb-open

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM version node version npm download npm license

node-cmb-open

掌上生活开放平台( https://open.cmbchina.com/Platform/ ) Node.js SDK

安装

npm install cmb-open --save

使用

const CMB = require('cmb-open');
const cmb = new CMB({
  mid: 'xxx',
  aid: 'xxx',
  key: '/path/to/cmb.key',
  publicKey: '/path/to/pubkey.pem',
});

// 授权登录
cmb.getApproval();
// 获取 AccessToken
cmb.getAccessToken();
// 结果签名验证
cmb.verifyRespons();