igordrnobrega / vault-php-sdk
与 vaultproject.io API 通信的 SDK
3.1.5
2020-01-23 18:06 UTC
Requires
- guzzlehttp/guzzle: ~6.0
- psr/log: ~1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- dev-master
- 3.1.5
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.0
- 2.0.2
- 2.0.1
- 2.0.0
- 1.0.0
- dev-dependabot/composer/guzzlehttp/psr7-1.9.1
- dev-dependabot/composer/guzzlehttp/guzzle-6.5.8
- dev-hotfix/exception-name
- dev-feature/set-get-secret-path
- dev-bugfix/secret-path-data
- dev-feature/remove-log-no-error
- dev-feature/update-ns
- dev-bugfix/rewind-response-stream
This package is auto-updated.
Last update: 2024-09-19 23:11:46 UTC
README
安装
此库可以使用 composer 安装
composer require igordrnobrega/vault-php-sdk
使用方法
使用此 SDK 的简单方法是实例化服务工厂
$sf = new IGN\Vault\ServiceFactory();
然后,可以从该工厂检索服务
$sys = $sf->get('sys');
所有服务方法遵循相同的约定
$response = $service->method($mandatoryArgument, $someOptions);
- 所有 API 必须的参数都放在第一位;
- 所有 API 可选参数直接从
$someOptions映射; - 所有方法返回原始 guzzle 响应。
示例
examples 目录是从我的 CakePHP 3 应用中提取的 SDK 纯粹示例 - 它很简单,但应该展示了 SDK 的基本用法
可用服务
- sys
- data
- transit
- auth/token
- auth/approle
许可协议
MIT