Download the PHP package masterix21/laravel-licensing-client without Composer

On this page you can find all versions of the php package masterix21/laravel-licensing-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-licensing-client

Laravel Licensing Client

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A Laravel package for integrating license validation in your applications. Works with the Laravel Licensing server to provide secure, offline-capable license management using PASETO v4 tokens with Ed25519 signatures.

Related Packages

Requirements

Installation

Publish the configuration:

Run the migrations:

Configuration

Add these variables to your .env:

The full configuration is in config/licensing-client.php:

Usage

Facade

Dependency Injection

Middleware

Protect routes with the license middleware:

Middleware Behavior

The middleware follows this flow:

  1. Check if the route is excluded
  2. Validate the stored token offline
  3. If valid, check force_online_after — refresh if past date
  4. If token invalid, attempt refresh from server
  5. If refresh fails, check client-side grace period
  6. If not in grace period, check server health
  7. If server unreachable, start grace period and allow access
  8. If server healthy and no valid license, block with 403

On valid requests, the middleware also:

Accessing Expiration Warnings

Excluding Routes

Configure in config/licensing-client.php:

Grace Period

The client manages a local grace period when the licensing server is unreachable:

The default grace period is 7 days, configurable via LICENSING_GRACE_PERIOD_DAYS.

The middleware automatically enters grace period when the server is unreachable, allowing the application to continue working.

Artisan Commands

Heartbeat

When enabled, the package automatically sends heartbeats to the licensing server at the configured interval. The heartbeat reports:

Configure in .env:

The heartbeat is registered as a scheduled task in the service provider and runs via Laravel's scheduler.

Token Validation

The client validates PASETO v4 tokens offline using the Ed25519 public key. The following claims are validated:

Claim Validation
usage_fingerprint Must match the current device fingerprint
exp Token must not be expired
status Must be active or grace
force_online_after If past, an online refresh is required

The client also stores the public_key_bundle received from the server during activation and refresh, enabling future key rotation support.

Device Fingerprinting

The client generates a stable SHA-256 fingerprint from:

This fingerprint is sent to the server during activation to bind the license to the device.

Custom Fingerprint Generator

Error Handling

The package throws LicensingException with specific factory methods:

API Communication

The client communicates with the server at /api/licensing/v1/ using these endpoints:

Method Endpoint Description
POST /activate Activate a license with fingerprint
POST /deactivate Deactivate a license
POST /refresh Refresh the PASETO token
POST /heartbeat Send heartbeat with usage data
POST /validate Validate license server-side
POST /licenses/show Get license information
GET /health Check server health

All responses follow the format:

Error responses:

The client handles these HTTP error codes: 404 (invalid key), 403 (fingerprint mismatch / not active), 409 (usage limit / fingerprint conflict / offline disabled), 410 (expired), 422 (validation failed), 423 (suspended / cancelled), 429 (rate limited).

Testing

In Your Application Tests

Mocking the Client

Running Package Tests

Development Roadmap

The following features are planned for future releases:

Phase 1 — Token Security

Phase 2 — Features & Entitlements

Phase 3 — Network Resilience

Phase 4 — License Information

Phase 5 — Key Rotation

Contributing

Contributions are welcome! Please submit a Pull Request.

License

MIT License. See LICENSE.md.

Credits


All versions of laravel-licensing-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3 || ^8.4 || ^8.5
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^12.0||^13.0
illuminate/support Version ^12.0||^13.0
illuminate/http Version ^12.0||^13.0
guzzlehttp/guzzle Version ^7.8
paragonie/paseto Version ^3.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package masterix21/laravel-licensing-client contains the following files

Loading the files please wait ...