laravel-microservices-rpc-http maintained by mk-josias
Description
HTTP driver for the RPC of mk-josias/laravel-microservices: signed calls between services, one endpoint per service.
Author
Last update
2026/10/11 21:52
(dev-main)
License
Downloads
15
Tags
HTTP RPC
The http RPC driver of laravel-microservices: signed calls between services.
composer require mk-josias/laravel-microservices-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. It reads these keys of
config/microservices.php:
'rpc' => [
'path' => env('MICROSERVICES_RPC_PATH', '{service}/rpc/{method}'), // the same in every service
'middleware_group' => 'rpc', // the group of those routes, which checks the signature
'secret' => env('MICROSERVICES_RPC_SECRET', env('APP_KEY', '')), // shared by caller and called
'signature_ttl' => 30, // seconds a signature stays valid
],
| 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.