Download the PHP package tecnozt/proteczt-client without Composer
On this page you can find all versions of the php package tecnozt/proteczt-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tecnozt/proteczt-client
More information about tecnozt/proteczt-client
Files in tecnozt/proteczt-client
Package proteczt-client
Short Description Laravel client package for Proteczt License Management System - verify and control application licenses remotely.
License proprietary
Homepage https://github.com/tecnozt/proteczt-client
Informations about the package proteczt-client
Proteczt Client
Laravel client package for Proteczt — a remote license management system. Install this package in your distributed Laravel applications to control access from a central Proteczt server.
Requirements
| Dependency | Version |
|---|---|
| PHP | ^8.2 |
| Laravel | ^11.0 or ^12.0 |
Installation
Laravel auto-discovery registers the service provider automatically. No manual registration needed.
Configuration
1. Publish the config file
This creates config/proteczt.php in your application.
2. Add environment variables to .env
Get your API token: Login to your Proteczt server dashboard → API Tokens → Generate New Token.
3. Register the middleware
Apply license checking to your routes. In bootstrap/app.php (Laravel 11+):
Then in your routes:
4. Register your application
This sends your application details (name, domain, hostname) to the Proteczt server. This also happens automatically on the first web request if auto_register is enabled.
How It Works
- First boot: Service provider registers the app with Proteczt (stored in
storage/app/.proteczt_registered). - Every request: Middleware checks license status (cached for 1 hour by default).
- If active: Request passes through normally.
- If inactive/expired: Returns 403 with an error page (or JSON for API requests).
- If server is unreachable: Fail-open — request is allowed to prevent downtime.
Artisan Commands
| Command | Description |
|---|---|
php artisan proteczt:register |
Register this app to Proteczt server |
php artisan proteczt:register --force |
Re-register (overwrite existing) |
php artisan proteczt:check |
Check license status (from cache) |
php artisan proteczt:check --fresh |
Check status (bypass cache) |
php artisan proteczt:refresh |
Force-refresh license cache |
Controlling Your App from the Server
Once installed, you control the application entirely from the Proteczt dashboard:
| Action | Effect |
|---|---|
| Set status → Inactive | App blocked within 1 hour (or immediately after proteczt:refresh) |
| Set status → Active | App resumes within 1 hour |
| Set Expired At date | App automatically blocked on that date |
| Delete client | App unregistered — future check-status returns inactive |
Facade
Publishing Views
To customise the "License Inactive" error page:
This copies the view to resources/views/vendor/proteczt/errors/license-expired.blade.php.
Configuration Reference
| Key | Env Variable | Default | Description |
|---|---|---|---|
api_url |
PROTECZT_API_URL |
— | Proteczt server URL (required) |
api_token |
PROTECZT_API_TOKEN |
— | Bearer token from Proteczt (required) |
domain |
PROTECZT_DOMAIN |
null (auto) |
Override domain detection |
auto_register |
PROTECZT_AUTO_REGISTER |
true |
Auto-register on first request |
skip_local |
PROTECZT_SKIP_LOCAL |
true |
Skip check in local/testing env |
cache_duration |
PROTECZT_CACHE_DURATION |
0 |
Cache TTL in seconds (0 = no cache, real-time enforcement) |
timeout |
PROTECZT_TIMEOUT |
10 |
HTTP request timeout in seconds |
verify_ssl |
PROTECZT_VERIFY_SSL |
true |
Verify SSL certificates |
Security
- API token is stored in
.envand never exposed to end users. - Cache keys are SHA-256 hashed (domain + token) to prevent enumeration.
- Fail-open by design: If the Proteczt server is unreachable, your clients will not experience downtime. If you prefer fail-closed, override
isActive()via the service container. - HTTPS strongly recommended in production. The
verify_ssloption should always betrue. - A
401/403response from the server (e.g., invalid token) immediately returnsinactivewithout caching.
Testing
Troubleshooting
| Problem | Solution |
|---|---|
| App not registering | Check PROTECZT_API_URL and PROTECZT_API_TOKEN in .env |
| App always blocked | Check client status in Proteczt dashboard |
| Stale status after change | Run php artisan proteczt:refresh |
| SSL error in local | Set PROTECZT_VERIFY_SSL=false (local only) |
| Skip not working | Set PROTECZT_SKIP_LOCAL=true and APP_ENV=local |
Changelog
See CHANGELOG.md.
License
MIT — see LICENSE.
Made with ❤️ by Tecnozt
All versions of proteczt-client with dependencies
illuminate/contracts Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
illuminate/http Version ^11.0|^12.0
illuminate/cache Version ^11.0|^12.0
illuminate/console Version ^11.0|^12.0
guzzlehttp/guzzle Version ^7.0