@axolo/egg-cos-sts

Tencent cloud COS STS plugin for Egg.js.

Usage no npm install needed!

<script type="module">
  import axoloEggCosSts from 'https://cdn.skypack.dev/@axolo/egg-cos-sts';
</script>

README

egg-cos-sts

Tencent cloud COS STS SDK plugin for Egg.js.

Install

npm i @axolo/egg-cos-sts --save

Usage

// {app_root}/config/plugin.js
exports.cosSts = {
  enable: true,
  package: '@axolo/egg-cos-sts',
};

Configuration

// {app_root}/config/config.default.js
exports.cosSts = {
};

see config/config.default.js for more detail.

API

getCredential([ options ])

params type desc
options Object merge to plugin options
return Promise STS Credential

getPolicy(scope)

params type desc
scope Array statement array of COS STS
return Object COS STS policy like options

Questions & Suggestions

Please open an issue here.

License

MIT

TODO

  • Cache Adapter