2.1 KiB
2.1 KiB
Central License Manager
This folder is a standalone multi-app activation manager that lives separately from the legacy license_manager/ code.
What it includes
index.php— landing page + JSON API endpointsmanage.php— admin dashboard for apps, licenses, and activationsinstall.php— schema check / auto-install pageconfig.php— local config and move-to-another-server settingsbootstrap.php— shared DB, schema, and helper logic
Tables it manages
clm_appsclm_licensesclm_activations
API endpoints
Use the folder base URL as the app setting:
LICENSE_API_URL=https://your-domain.example/central_license_manager
Then the client will call:
index.php?action=activateindex.php?action=verifyindex.php?action=deactivateindex.php?action=health
Admin/owner endpoints require the secret:
index.php?action=issueindex.php?action=listindex.php?action=appsindex.php?action=update
Moving this folder later
- Copy the whole
central_license_manager/directory to the new server. - Set
CLM_DB_HOST,CLM_DB_NAME,CLM_DB_USER,CLM_DB_PASS. - Set
CLM_API_SECRETandCLM_ADMIN_PASSWORD. - Open
install.phponce to auto-create the tables. - Point each client app to the new base URL.
Compatibility note
The API currently returns both:
max_activationsallowed_activations
That keeps older client code working while you gradually upgrade each app to send a dedicated app_slug.
Current repo integration
This repo's lib/LicenseService.php now auto-detects this folder when LICENSE_API_URL is not set and uses it as the activation authority.
Default client values in this app:
LICENSE_APP_SLUG=bilingual-accountingLICENSE_APP_NAME=Bilingual Accounting
You can override them per app with environment variables:
LICENSE_API_URLLICENSE_API_SECRETLICENSE_APP_SLUGLICENSE_APP_NAMELICENSE_PRODUCT_NAMELICENSE_PRODUCT_VERSION
So when you move central_license_manager/ to another server later, you only need to point each app to the new base URL and set the right app slug/name.