koshatul/vault

This package is abandoned and no longer maintained. No replacement package was suggested.

Koshatul Vault Config Storage

v1.0.4 2016-04-05 00:42 UTC

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.

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

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');