PHPackages                             tecnozt/proteczt-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. tecnozt/proteczt-client

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

tecnozt/proteczt-client
=======================

Laravel client package for Proteczt License Management System - verify and control application licenses remotely.

v1.0.2(2mo ago)03proprietaryPHPPHP ^8.2

Since Feb 26Pushed 2mo agoCompare

[ Source](https://github.com/jarwonozt/proteczt-client)[ Packagist](https://packagist.org/packages/tecnozt/proteczt-client)[ Docs](https://github.com/tecnozt/proteczt-client)[ RSS](/packages/tecnozt-proteczt-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (4)Used By (0)

Proteczt Client
===============

[](#proteczt-client)

[![Packagist Version](https://camo.githubusercontent.com/7008b9f347b572229c57ce14ecd47bbaeb5f03df760657c61785db1dcd81df1c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7465636e6f7a742f70726f7465637a742d636c69656e74)](https://packagist.org/packages/tecnozt/proteczt-client)[![PHP Version](https://camo.githubusercontent.com/7798218a01a7c8d6f4cfeef43eec59611256d1be339bcafbc9893611c8331d6f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7465636e6f7a742f70726f7465637a742d636c69656e74)](https://packagist.org/packages/tecnozt/proteczt-client)[![License](https://camo.githubusercontent.com/fb54b90eee8acb9d618eaea1aa2868c0a4e52c2621bc0cf1a24604569ca0582e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7465636e6f7a742f70726f7465637a742d636c69656e74)](LICENSE)

Laravel client package for [Proteczt](https://github.com/tecnozt/proteczt) — a remote license management system. Install this package in your distributed Laravel applications to control access from a central Proteczt server.

---

Requirements
------------

[](#requirements)

DependencyVersionPHP^8.2Laravel^11.0 or ^12.0---

Installation
------------

[](#installation)

```
composer require tecnozt/proteczt-client
```

Laravel auto-discovery registers the service provider automatically. No manual registration needed.

---

Configuration
-------------

[](#configuration)

### 1. Publish the config file

[](#1-publish-the-config-file)

```
php artisan vendor:publish --tag=proteczt-config
```

This creates `config/proteczt.php` in your application.

### 2. Add environment variables to `.env`

[](#2-add-environment-variables-to-env)

```
PROTECZT_API_URL=https://your-proteczt-server.com
PROTECZT_API_TOKEN=your-api-token-here
PROTECZT_DOMAIN=your-app-domain.com   # Optional — auto-detected if omitted

# Optional tuning
PROTECZT_AUTO_REGISTER=true
PROTECZT_SKIP_LOCAL=true
PROTECZT_CACHE_DURATION=0        # 0 = real-time (check every request), 60-300 = reduce API load
PROTECZT_TIMEOUT=10
PROTECZT_VERIFY_SSL=true
```

> **Get your API token:** Login to your Proteczt server dashboard → **API Tokens** → Generate New Token.

### 3. Register the middleware

[](#3-register-the-middleware)

Apply license checking to your routes. In `bootstrap/app.php` (Laravel 11+):

```
use Tecnozt\Proteczt\Http\Middleware\CheckProtecztLicense;

->withMiddleware(function (Middleware $middleware) {
    // Apply to all web routes:
    $middleware->append(CheckProtecztLicense::class);

    // Or apply only to specific route groups (recommended):
    $middleware->alias([
        'proteczt' => CheckProtecztLicense::class,
    ]);
})
```

Then in your routes:

```
// routes/web.php
Route::middleware('proteczt')->group(function () {
    // Protected routes
});
```

### 4. Register your application

[](#4-register-your-application)

```
php artisan proteczt:register
```

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
------------

[](#how-it-works)

```
┌─────────────────────┐           Register / Check Status           ┌─────────────────────┐
│  Laravel App        │ ─────────────────────────────────────────>  │  Proteczt Server    │
│  (Client)           │                                              │  (License API)      │
│                     │  { active: true/false }                     │                     │
│  CheckProteczt      │
