egg-aliyun-auth-helper
Install
$ npm i egg-aliyun-auth-helper --save
Usage
// {app_root}/config/plugin.jsexportsaliyunAuthHelper = enable: true package: 'egg-aliyun-auth-helper';
Configuration
// {app_root}/config/config.default.jsexportsaliyunAuthHelper = accessKeyId: 'zxc' accessKeySecret: 'zxc' endpoint: 'https://aaaaa.aliyunc.com' apiVersion: '2015-04-01' bucket: 'kjashdkjas';
see config/config.default.js for more detail.
Example
async { const ctx app = this; const roleSession = 'BrowserSingleUpload'; const roleAction = '"oss:PutObject"'; const data = roleSession roleAction ; const result = await appauthHelper; return result;}
Questions & Suggestions
Please open an issue here.