masterix21/laravel-licensing-client
Laravel client for integrating license validation into your app. Verify keys, activate or deactivate installations, and check license status against a remote licensing server, with a simple, configurable API for gating features and managing subscriptions.
Architecture fit
masterix21/laravel-licensing-client is the consumer-side half of a two-repo licensing system (paired with laravel-licensing server v2.0.0). Architecturally it is a Laravel-native verification library: config-driven, service-provider registered, and designed to validate PASETO tokens locally using Ed25519 public keys rather than calling the licensing server on every request. That is the right shape for a licensing dependency — verification stays in-process and fast, and the server is only needed for issuance, key discovery, and entitlement refresh. The 2.0.0 additions (certificate chain verification, public key bundle application, validator initialization from a stored bundle) shift the package from "verify a token with a static key" to "maintain a chain of trust with offline key rotation." That is a materially larger architectural commitment: the application now owns key material lifecycle, not just token parsing.
Integration feasibility Integration is conventional for a Laravel package — composer install, config publish, middleware/guard wiring — with two hard prerequisites introduced by 2.0.0:
licensing-client.issuer must be configured to match the server's issuer value. There is no indication of a permissive default; the release notes state tokens with an invalid issuer are now rejected.The package targets PHP 8.4 and 8.5 and tests against Laravel 13. Teams on PHP 8.2/8.3 or Laravel 10/11/12 need to confirm the actual composer.json constraint rather than infer support from the CI matrix — CI coverage is not the same as a declared floor.
Technical risk
Key questions
licensing-client.issuer required, or does it default to a value that silently rejects everything?composer.json (independent of the CI matrix)?Stack fit Strong fit for a Laravel monolith or a Laravel-based SaaS where licensing gates features or seat counts. The package operates at the framework's natural seams: config file, service provider, and a validator that can be resolved from the container and invoked from middleware. The offline verification model suits request-path enforcement; the entitlements API suits feature-flag reads. Teams already running a Laravel licensing server v1.x are the obvious adopters; teams with a bespoke or third-party licensing backend are not served by this release at all.
Migration path Treat this as a coordinated two-sided upgrade, not a library bump:
laravel-licensing server to v2.0.0 first, with issuer value finalized and communicated.licensing-client.issuer explicitly rather than relying on any default.composer.json constraints against the current PHP/Laravel version in production.Compatibility
Two independent axes: client↔server (hard-pinned to v2.0.0 on both sides) and client↔runtime (PHP 8.4/8.5, Laravel 13 in CI). The second axis is the more likely blocker for existing applications, since PHP 8.4 is a recent floor. Confirm the declared constraints rather than the tested matrix. v1.0.0-issued tokens carry no iss and will be rejected — plan for a re-issuance window rather than assuming a graceful fallback.
Sequencing Server upgrade → issuer configured on both sides → bundle bootstrapped and cached → token re-issuance → client 2.0.0 deployed to a canary cohort → observe verification failure rates → full rollout. Do not deploy the client before the server, and do not deploy both simultaneously without a rollback plan, because the failure mode is total token rejection.
Maintenance The package now carries a release-coupling obligation: client majors track server majors. Budget for coordinated upgrade planning each cycle, plus ownership of key material — bundle storage, rotation events, and issuer configuration become operational artifacts with a change-control trail. This is a step up in maintenance burden from a stateless token parser.
Support Expect a new class of inbound issues distinguishable by symptom:
Support runbooks should map symptoms to these four causes before escalation. The improved HTTP error mapping (400, 5xx) helps here — clearer server-side signal shortens triage — but client-side verification failures never reach the server and won't appear in server logs. Client-side logging of verification failure reasons is worth instrumenting explicitly.
Scaling Offline Ed25519 verification is cheap and scales horizontally without touching the licensing server; that is the package's main operational virtue and it holds at high request volume. The scaling risks are elsewhere: entitlements lookups per request (cache aggressively, and confirm the storage backend's read cost), and boot-time bundle reads (must be cached, not fetched, at startup). Neither is a throughput wall, but both are latency and availability dependencies that did not exist in v1.
Failure modes
Ramp-up Modest for a competent Laravel team on the mechanical integration — it is config plus middleware. The real ramp-up is conceptual: engineers must understand PASETO, Ed25519 signatures, chain-of-trust verification, and why key rotation is a client-side concern. Teams that treat this as "install and forget" will be the ones paged during a rotation. Recommend a short internal write-up covering the trust chain, the rotation runbook, and the four failure signatures before go-live. Documentation quality in the upstream repo is the variable to validate during the spike — the release notes describe what changed but not the operational procedures around it.
How can I help you explore Laravel packages today?