The License System project provides full control over the application license system through an API with built-in authorization. It allows quick management of licenses, including creating, editing, deleting and viewing information. Integration with the Discord bot allows you to generate reports, check the validity of licenses and assign them to users, making administration much easier.
API is dedicate to minecraft plugins but can by used in other products and apps.
- On startup:
curl -X 'GET' \
'http://localhost:8080/api/v1/license/generateServerKey/<licenseKey>' \
-H 'accept: */*' \
-H 'Authorization: admin-secret-token'
When the application starts, it performs a reqest to the API to verify if the token key is correct and generate a new serverKey. If the license key is correct it sends the new generated serverKey.
- On running:
curl -X 'PUT' \
'http://localhost:8080/api/v1/license/isValidServerKey' \
-H 'accept: */*' \
-H 'Authorization: admin-secret-token' \
-H 'Content-Type: application/json' \
-d '{
"licenseKey": "string",
"serverKey": "string"
}'
The application every x time sends a request to the API to verify if the server key is correct. If it is not correct it means that another application with the same license key has been started. Then the application closes.
- Clone repository
git clone https://github.com/Norbit4/LicenseSystem
-
Create discord bot and invite bot to your server
-
Copy bot token and paste it to docker-compose.yml
-
Start app
docker-compose up
Documentation was created using OpenApi
- local env: http://localhost:8080/swagger-ui/index.html
The discord bot allows easy management of licenses and tokens.
preview:
- Licenses
- Report
- Tokens