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

@blueshit/aliyun-sts

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blueshit/aliyun-sts

轻量级阿里云STS客户端,不依赖任何第三方库,体验飞一般的感觉

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

@blueshit/aliyun-sts

轻量级阿里云STS客户端,不依赖任何第三方库,体验飞一般的感觉

安装

npm i @blueshit/aliyun-sts -S

使用

import { STS } from "@blueshit/aliyun-sts";

const sts = new STS({
  accessKeyId: ENV_ACCESS_KEY_ID,
  accessKeySecret: ENV_ACCESS_KEY_SECRET,
});
const policy = {
  Statement: [
    {
      Effect: "Allow",
      Action: ["oss:GetObject", "oss:PutObject"],
      Resource: [`acs:oss:*:*:${ENV_BUCKET}/*`],
    },
  ],
  Version: "1",
};

const credentials = await sts.assumeRole(ENV_ACS_RAM, policy, 15 * 60, "RoleSessionName");
console.log(credentials);

授权协议

The MIT License

Keywords

FAQs

Package last updated on 18 Apr 2018

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