Download the PHP package wlfpanda1012/easy-sts without Composer

On this page you can find all versions of the php package wlfpanda1012/easy-sts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package easy-sts

EasySts

介绍

一款简单易用的 临时访问凭证(StsToken) 封装包. 写法上借鉴了 HyperfFileSystem 包. 使用了 适配器 的方式实现了 不同服务端的 Sts 接口. 只需要做简单的配置即可使用.

平台支持

安装

单独包传送门

发布配置

配置用例

使用

⚠️ 注意:

  • 不同的平台对应的 policy 的写法略微不同。getToken 请自定义对应的 policy 进行传入。
  • 好的,我知道大家并不想写 Policy,但各位在对文件的访问控制的颗粒度如果需要到具体文件的程度,那就并不是写死的 config 就能搞定的了。
  • 所以我在 easySts 项目里 我接口中增加了各个不同的服务的 policy 的生成用接口。

默认配置

Hyperf 下可以使用,因为在 ConfigProvider 已经做了映射配置。 如果你想在 Laravel 或者别的框架中使用默认配置的写法的话,以 Laravel 举例,可以写一个 ServiceProvider 类,并在 register 方法中注册即可。 具体写法可以参照我另外一个包 Laravel-passport-cacheCacheServiceProvider.php

自定义配置

Policy生成

  • 实现的接口
  • public function storagePolicy(string $effect, array $actions, array|string $path, array $config = []): array
  • effect = ALLOW/DENY actions = 根据不同的平台 actions 的写法不同,目前使用的是Aliyun OSS, path 可以为单一的string,如果是复数文件则用数组. config 里 可以写入其他配置(比如 桶名字,UID 等 具体配置参数不同平台的key不同,可以查看代码)

Storage(文件存储)


All versions of easy-sts with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
hyperf/di Version 3.1.*
wlfpanda1012/common-sts Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wlfpanda1012/easy-sts contains the following files

Loading the files please wait ....