PHPackages                             juniorfontenele/laravel-vault-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. juniorfontenele/laravel-vault-client

AbandonedArchivedLibrary[HTTP &amp; Networking](/categories/http)

juniorfontenele/laravel-vault-client
====================================

A vault client for Laravel vault server.

1.0.0(11mo ago)015[3 PRs](https://github.com/juniorfontenele/laravel-vault-client/pulls)MITPHPPHP ^8.3CI passing

Since May 27Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/juniorfontenele/laravel-vault-client)[ Packagist](https://packagist.org/packages/juniorfontenele/laravel-vault-client)[ Docs](https://github.com/juniorfontenele/laravel-vault-client)[ GitHub Sponsors](https://github.com/juniorfontenele)[ RSS](/packages/juniorfontenele-laravel-vault-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (20)Versions (5)Used By (0)

Laravel Vault Client
====================

[](#laravel-vault-client)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0c63f433f8a861f2d36727dc8f95a9fdc1edaeb6b7cb50d25ea7000bcb14851b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a756e696f72666f6e74656e656c652f6c61726176656c2d7661756c742d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/juniorfontenele/laravel-vault-client)[![Tests](https://camo.githubusercontent.com/89b937d5f83ae5a1ec52591f1ca2433bc71d2b7e2c4be81601dd38ca7218adc6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a756e696f72666f6e74656e656c652f6c61726176656c2d7661756c742d636c69656e742f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/juniorfontenele/laravel-vault-client/actions/workflows/tests.yml)[![Total Downloads](https://camo.githubusercontent.com/998af5284243645dde87cc0a785050643e5669020a77f833ae75a77c97359328/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a756e696f72666f6e74656e656c652f6c61726176656c2d7661756c742d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/juniorfontenele/laravel-vault-client)

Laravel Vault Client is a client for Laravel Vault Server provided by `juniorfontenele/laravel-vault-server` package for secure key management, key rotation, JWT signing/validation, and secure user hash storage.

Installation
------------

[](#installation)

Install via composer:

```
composer require juniorfontenele/laravel-vault-client
```

Publish and run the migrations:

```
php artisan vault:install
```

Artisan Commands
----------------

[](#artisan-commands)

- `php artisan vault:install` — Publish and run the migrations.
- `php artisan vault:provision {token}` — Provision the client in Vault using the provision token.
- `php artisan vault:rotate` — Rotate the client's private key.

Usage Examples
--------------

[](#usage-examples)

### Rotate Private Key

[](#rotate-private-key)

```
use JuniorFontenele\LaravelVaultClient\Facades\VaultClient;

$newKey = VaultClient::rotateKey();
```

### Get Public Key by Key ID

[](#get-public-key-by-key-id)

```
use JuniorFontenele\LaravelVaultClient\Facades\VaultClient;

$publicKey = VaultClient::getPublicKey($kid);
```

### Get User Hash

[](#get-user-hash)

```
use JuniorFontenele\LaravelVaultClient\Facades\VaultClient;

$hash = VaultClient::getHashForUser($userId);
```

### Store User Password (hash will be generated)

[](#store-user-password-hash-will-be-generated)

```
use JuniorFontenele\LaravelVaultClient\Facades\VaultClient;

VaultClient::storePasswordForUser($userId, $password);
```

### Store User Hash (provide your own hash)

[](#store-user-hash-provide-your-own-hash)

```
use JuniorFontenele\LaravelVaultClient\Facades\VaultClient;

VaultClient::storeHashForUser($userId, $hash);
```

### Delete User Hash

[](#delete-user-hash)

```
use JuniorFontenele\LaravelVaultClient\Facades\VaultClient;

VaultClient::deleteHashForUser($userId);
```

### Protecting Routes with JWT Middleware

[](#protecting-routes-with-jwt-middleware)

You can protect your routes using the `vault.jwt` middleware:

```
use Illuminate\Support\Facades\Route;

Route::middleware(['vault.jwt'])->group(function () {
    // Your protected routes here
});
```

You may also pass scopes as optional parameters to the middleware:

```
Route::middleware(['vault.jwt:admin'])->get('/admin', ...);
```

Configuration
-------------

[](#configuration)

The configuration file `config/vault.php` will be published with all required options, such as `client_id`, `url`, `issuer`, TTLs, etc.

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Junior Fontenele](https://github.com/juniorfontenele)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). See [License File](LICENSE.md) for more information.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance66

Regular maintenance activity

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

351d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3694405?v=4)[Junior Fontenele](/maintainers/juniorfontenele)[@juniorfontenele](https://github.com/juniorfontenele)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")[![juniorfontenele](https://avatars.githubusercontent.com/u/3694405?v=4)](https://github.com/juniorfontenele "juniorfontenele (1 commits)")

---

Tags

vaultvault-clientjuniorfontenelelaravel-vault-client

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/juniorfontenele-laravel-vault-client/health.svg)

```
[![Health](https://phpackages.com/badges/juniorfontenele-laravel-vault-client/health.svg)](https://phpackages.com/packages/juniorfontenele-laravel-vault-client)
```

###  Alternatives

[danharrin/livewire-rate-limiting

Apply rate limiters to Laravel Livewire actions.

40423.1M27](/packages/danharrin-livewire-rate-limiting)[mateusjunges/laravel-kafka

A kafka driver for laravel

7163.1M17](/packages/mateusjunges-laravel-kafka)[illuminate/http

The Illuminate Http package.

11936.0M5.1k](/packages/illuminate-http)[ricorocks-digital-agency/soap

A SOAP client that provides a clean interface for handling requests and responses.

4281.8M5](/packages/ricorocks-digital-agency-soap)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[laravel-shift/curl-converter

A command line tool to convert curl requests to Laravel HTTP requests.

935.3k](/packages/laravel-shift-curl-converter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
