koshatul / vault
Koshatul Vault Config Storage
Installs: 1 122
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
pkg:composer/koshatul/vault
Requires
- php: >=5.5
- guzzlehttp/guzzle: ^6.2.0
This package is not auto-updated.
Last update: 2022-05-14 05:58:47 UTC
README
This is unmaintained, I haven't used it in quite a while and don't have the time to update and test it properly.
A interface for retrieving values from Hashicorp Vault in a PHP Project.
Installation
Use Composer to install the package:
Add the following to your composer.json
and run composer update
.
"require": { "koshatul/vault": "~1.0" }
Usage
You can use this package to get configuration from a global or specific configuration store.
use Koshatul\Vault\Vault; use Koshatul\Vault\VaultURI; use Koshatul\Vault\VaultAuthToken; $vaultURI = new VaultURI("http://127.0.0.1:8200/v1/"); $vaultAuthToken = new VaultAuthToken("tttttttt-wwww-xxxx-yyyy-zzzzzzzzzzzz"); $vault = new Vault($vaultURI, $vaultAuthToken); $vault->write('secret/foo' ['pear' => 'table']); $testValue = $vault->read('secret/foo'); echo "Pear: ".$testValue->get('pear');