immense / macaroons
Macaroons 的 PHP 实现
2.0.0
2019-10-17 18:46 UTC
Requires
- php: >=7.2.0
Requires (Dev)
- phpunit/phpunit: 4.*
- satooshi/php-coveralls: 0.6.*
README
这个 PHP 库实现了 macaroons,允许去中心化委托、衰减和验证。
要求
注意:libsodium-php 2.x 可以通过 兼容层 使用,直到这个包被更新。
libsodium 在 PHP 7.2 中可用
安装 libsodium-php
-
在 OS X 上使用 homebrew
brew tap homebrew/php brew install php55-libsodium
-
使用
pecl
pecl install libsodium
通过 composer 安装
在您的项目目录中
-
如果需要,在您的项目中创建一个
composer.json
composer init
-
将最新版本作为项目依赖项安装
composer require immense/macaroons
测试
注意:phpunit 5 需要 PHP >= 5.6
文件必须以 Test
结尾,例如 ClassTest.php
-
从
php-macaroons
根目录phpunit
-
在文件更改时运行测试(可选)
gem install watchr watchr ./autotest-watchr.rb
许可
php-macaroons 使用 MIT 许可证授权。有关更多信息,请参阅 许可证。