PHPackages                             codemonkeyluffy/aliyun-sts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. codemonkeyluffy/aliyun-sts

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

codemonkeyluffy/aliyun-sts
==========================

基于阿里云STS最新版本的SDK封装的composer组件包

v1.0.0(6y ago)016MITPHPCI failing

Since Oct 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/CodeMonkeyLuffy/aliyun-sts)[ Packagist](https://packagist.org/packages/codemonkeyluffy/aliyun-sts)[ RSS](/packages/codemonkeyluffy-aliyun-sts/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (2)Used By (0)

Aliyun Sts for PHP
==================

[](#aliyun-sts-for-php)

Installing
----------

[](#installing)

```
$ composer require codemonkeyluffy/aliyun-sts
```

### configuration

[](#configuration)

拷贝项目下`src/config.php`到你项目中，进行配置其中sts。

配置示例代码：

```
return [

    /*STS配置*/
    'sts' => [
        'AccessKeyID' => '****密码不给看****',
        'AccessKeySecret' => '****密码不给看****',
        'regionId' => 'cn-beijing',
        'endpoint' => 'sts.cn-beijing.aliyuncs.com',
        'roleArn' => 'acs:ram::1******38:role/aliyun*******rkfdale',  // 角色资源描述符，在RAM的控制台的资源详情页上可以获取
        'timeout' => '3600',  // 令牌过期时间
        'client_name' => 'client_name',  // setRoleSessionName可以不改
        // 在扮演角色(AssumeRole)时，可以附加一个授权策略，进一步限制角色的权限；
        // 详情请参考《RAM使用指南》
        // 这代表所有权限
        'policy' => [
            'Statement' => [
                [
                    'Action' => ["oss:*"],
                    'Effect' => 'Allow',
                    'Resource' => ["acs:oss:*:*:*"],
                ]
            ]
        ]
    ]
];
```

Example
-------

[](#example)

```
use CodeMonkeyLuffy\AliSTS\Services\STSService;

        try {
            $config = include 'your_path/config.php';
            $sts = new STSService($config);
            $result =  $sts->getToken(); // 获取播放权限参数
            print_r($result);
            return $result;
        } catch (\Exception $e) {
            $err = "Error : 错误：" . $e->getMessage();
            echo $err . PHP_EOL;
        }
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2400d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6491ad3441669fa4d26b8852f86c0bb5728153ddbf9ac896c8a288a717e474cb?d=identicon)[CodeMonkeyLuffy](/maintainers/CodeMonkeyLuffy)

---

Top Contributors

[![CodeMonkeyLuffy](https://avatars.githubusercontent.com/u/4016890?v=4)](https://github.com/CodeMonkeyLuffy "CodeMonkeyLuffy (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/codemonkeyluffy-aliyun-sts/health.svg)

```
[![Health](https://phpackages.com/badges/codemonkeyluffy-aliyun-sts/health.svg)](https://phpackages.com/packages/codemonkeyluffy-aliyun-sts)
```

###  Alternatives

[randsonjs/inflect

A PHP class to handle words in Portuguese

1710.7k](/packages/randsonjs-inflect)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
