mk-josias / laravel-microservices-rpc-http
HTTP driver for the RPC of mk-josias/laravel-microservices: signed calls between services, one endpoint per service.
Package info
github.com/mk-josias/laravel-microservices-rpc-http
pkg:composer/mk-josias/laravel-microservices-rpc-http
v0.1.0
2026-10-11 19:52 UTC
Requires
- php: ^8.4
- mk-josias/laravel-microservices: v0.1.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
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.