PHPackages                             reallyli/laravel-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. reallyli/laravel-aliyun-sts

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

reallyli/laravel-aliyun-sts
===========================

Aliyun STS for Laravel.

1.0.0(5y ago)21.5kMITPHPPHP &gt;=7.0

Since Nov 5Pushed 5y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Laravel Aliyun STS
==================

[](#laravel-aliyun-sts)

🎃 Aliyun STS for Laravel.

Installing
----------

[](#installing)

```
$ composer require reallyli/laravel-aliyun-sts -v
```

After updated composer, if you are using laravel version &lt; 5.5, you need to register service provider:

```
// config/app.php

'providers' => [
    //...
    Reallyli\AliyunSts\ServiceProvider::class,
],
```

And publish the config file:

```
$ php artisan vendor:publish --provider=Reallyli\\AliyunSts\\ServiceProvider
```

if you want to use facade mode, you can register a facade name what you want to use, for example `AliyunSts`:

```
// config/app.php

'aliases' => [
    'AliyunSts' => Reallyli\AliyunSts\AliyunSts::class, // This is default in laravel 5.5
],
```

### configuration

[](#configuration)

```
// config/sts.php

return [
    /**
     * @link https://help.aliyun.com/document_detail/100624.html
     * AccessKeyId、AccessKeySecret：子账号AK信息
     */
    'accessKeyId'     => env('ALIYUN_STS_ACCESS_KEY_ID'),
    'accessKeySecret' => env('ALIYUN_STS_ACCESS_KEY_SECRET'),

    /**
     * @link https://help.aliyun.com/document_detail/66053.html
     * regionId和endpoint
     */
    'regionId'        => env('ALIYUN_STS_REGION_ID'),
    'endpoint'        => env('ALIYUN_STS_ENDPOINT'),

    /**
     * @link https://help.aliyun.com/document_detail/100624.html
     * 创建角色(需要扮演的角色ID)
     */
    'roleArn'         => env('ALIYUN_STS_ROLE_ARN'),

    /**
     * @link https://help.aliyun.com/document_detail/100624.html
     * 设置临时凭证的有效期，单位是s，最小为900，最大为3600
     */
    'expiration'      => env('ALIYUN_STS_EXIRATION'),  // 令牌过期时间

    /**
     * @link https://help.aliyun.com/document_detail/100624.html
     * RoleSessionName即临时身份的会话名称，用于区分不同的临时身份
     */
    'clientName'      => env('ALIYUN_STS_CLIENT_NAME'),

    /**
     * @link https://help.aliyun.com/document_detail/100624.html
     * 创建权限策略(在扮演角色的时候额外添加的权限限制)
     */
    'policy'          => [
        'Statement' => [
            [
                'Action'   => "*",
                'Effect'   => 'Allow',
                'Resource' => [
                    "acs:oss:*:*:default",
                ],
            ],
        ],
        "Version"   => "1",
    ],
];
```

Usage
-----

[](#usage)

```
AliyunSts::getCredentials();
```

Links
-----

[](#links)

- [STS SDK](https://help.aliyun.com/document_detail/121136.html?spm=a2c4g.11186623.2.19.51543b49AiMApk#reference-w5t-25v-xdb)
- [使用STS临时授权](https://help.aliyun.com/document_detail/32106.html?spm=a2c4g.11186623.2.27.5fef3b49T5nwTA#section-8rj-9sk-q7r)

Contact
-------

[](#contact)

-
-

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

2014d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b5243dfc642d12f1e56f6c4c0e4e7200037029ab22c6122a92756810d15176b?d=identicon)[reallyli](/maintainers/reallyli)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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