Download the PHP package fliglio/vault without Composer
On this page you can find all versions of the php package fliglio/vault. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package vault
Vault SDK
Supports:
- auth
- tokens
- authrole
- general
- read
- write
Examples
Configure Environment
The default client will leverage the environment variables VAULT_ADDR and VAULT_TOKEN
export VAULT_ADDR=http://localhost:8200
export VAULT_TOKEN=horde
Read and Write Secrets
$secrets = [
"foo" => "bar",
"baz" => "boo",
];
$c = new VaultClient();
$resp = $c->write('secret/testing', $secrets);
$found = $c->read('secret/testing');
print_r($found['data']);
// Output:
// Array
// (
// [baz] => boo
// [foo] => bar
// )
Login with AppRole
$roleId = "...";
$secretId = "...";
$secrets = [
"foo" => "bar",
"baz" => "boo",
];
$c = new VaultClient(new DefaultVaultConfigFactory([
'auth' => new AppRole($roleId, $secretId),
]));
$resp = $c->write('secret/testing', $secrets);
$found = $c->read('secret/testing');
print_r($found['data']);
// Output:
// Array
// (
// [baz] => boo
// [foo] => bar
// )All versions of vault with dependencies
PHP Build Version
Package Version
The package fliglio/vault contains the following files
Loading the files please wait ...