laravel-distributable-rpc-http maintained by mk-josias
Description
HTTP driver for the RPC of mk-josias/laravel-distributable: signed calls between modules, one endpoint per module.
Author
Last update
2026/10/21 16:08
(dev-main)
License
Downloads
7
Tags
HTTP RPC
The http RPC driver of laravel-microservices: signed calls between services.
composer require mk-josias/laravel-distributable-rpc-http
Its provider is discovered. It registers the driver of the shipped http transport, and serves
POST {service}/rpc/{method} for each service this process runs. Its settings are in
config/rpc-http.php (php artisan vendor:publish --tag=rpc-http-config); the secret stays
distributable.rpc.secret, shared by caller and called:
return [
// the same in every service
'path' => env('DISTRIBUTABLE_RPC_PATH', '{service}/rpc/{method}'),
// the group of those routes, which checks the signature
'middleware_group' => 'rpc',
// seconds a signature stays valid
'signature_ttl' => 30,
];
| What it guarantees | |
|---|---|
| Signed | an HMAC of the timestamp, a nonce, the path, the body and the propagated context |
| Fresh | a call older than signature_ttl is rejected |
| Once | each nonce is accepted once, through the cache |
| Answers | 200 the return value as JSON · 404 null · 400 no such contract or method · 403 bad signature |
What a service written in another language has to send is in Services in other languages.