Download the PHP package overtrue/laravel-qcloud-federation-token without Composer

On this page you can find all versions of the php package overtrue/laravel-qcloud-federation-token. 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 laravel-qcloud-federation-token

Laravel 腾讯云联合身份临时访问凭证生成器

Laravel Octane Ready Status GitHub release (latest SemVer) GitHub License Packagist Downloads

Laravel 腾讯云联合身份临时访问凭证 生成器,主要用于下发腾讯云联合身份临时访问凭证,比如前端直传等场景。

Sponsor me

开始之前,请您仔细阅读并理解一下官方文档:

安装

配置

你可以通过以下命令将配置文件写入 config/federation-token.php:

config/federation-token.php

配置语法请参考:https://cloud.tencent.com/document/product/598/10603

你可以根据使用场景配置多个策略,然后按策略分发访问凭证。

Warning

注意:condition 中使用 cos:content-type 记得 urlencode, 不然遇到带+号的 MIME 将会失效,比如 image/svg+xml

安全提醒

临时 token 规则配置不合理,可能会造成安全问题,请谨慎配置,请严格检查如下:

变量替换

在配置中难免会用到各种上下文变量或者一些动态 resouce 路径等,你可以在配置中指定 variables 变量来实现变量替换,例如:

仅 principal 和 resource 中的变量可以替换,其他变量不支持替换。

以上配置将会生成如下结果:

内置变量如下

使用

如果你需要获取生成 token 的配置信息,你可以使用 getStatements 方法:

格式请参考: https://cloud.tencent.com/document/product/1312/48195

字符限制问题

对于单次策略请求,官方限制策略总字符数为 1000 字符,稍微复杂一点就会超过这个限制,建议做法:

请求时将会产生交集结果,所以二者结合,既保证了安全,也避免了 API 断字符限制问题。

事件

Event Description
Overtrue\LaravelQcloudFederationToken\Events\TokenCreated token 生成时触发

:heart: 赞助我

Sponsor me

如果你喜欢我的项目并想支持它,点击这里 :heart:

贡献代码

你可以通过以下方式参与贡献:

  1. 通过 issue tracker 提交 Bug;
  2. 通过 issue tracker 回答问题或修复 Bug;
  3. 通过 Pull Request 增加新特性或优化文档。

代码贡献过程不需要很正式。你只需要确保你遵循 PSR-0、PSR-1 和 PSR-2 的编码准则。任何新的代码贡献都必须附带对应的单元测试。

Project supported by JetBrains

Many thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects.

PHP 扩展包开发

想知道如何从零开始构建 PHP 扩展包?

请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— 《PHP 扩展包实战教程 - 从入门到发布》

License

MIT


All versions of laravel-qcloud-federation-token with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version ^9.0|^10.0|^11.0
tencentcloud/tencentcloud-sdk-php Version ^3.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 overtrue/laravel-qcloud-federation-token contains the following files

Loading the files please wait ....