This project provides a RESTful API built with Spring Boot that exposes the functionalities of the License3j library over the web.
The API currently supports the following operations:
- Create a fresh license in memory
- Show the license loaded in memory
- Upload an existing license to memory from file
- Add features to new or existing licenses
- Generate private and public keys for signing and verifying new and existing licenses
- Sign and verify licenses
- Download and upload generated keys
- Digest public key into a java code ready byte array
- Redownload signed licenses
This API can be used in various scenarios, including:
- Web-based License Management Portal: A front-end application can be built on top of this API, providing a user-friendly web interface for software vendors to generate, manage, and distribute licenses.
- Automated License Generation: Software build processes or deployment pipelines can integrate with this API to automatically generate licenses as part of their workflow.
- Centralized License Server: This API can serve as a central point for managing licenses across different applications and deployments within an organization.
Important: Currently, this API does not have any built-in authentication or authorization mechanisms.
This project assumes that the reader is familiar with how License3j works and can create and apply licenses to their applications using either the License3j REPL application or the License3j GUI Application. If you are not familiar with how license3j works, the official repository README has a comprehensive guide on how to use the library. You can also head over to the License3j REPL Application Readme to acquire more details. If you are already familiar with these, you can skip to the numbered steps.
-
Cloning the repository
Clone the repo locally using Github CLI
gh repo clone Egg-03/License3j-WebAPIor via HTTPS
git clone https://github.com/Egg-03/License3j-WebAPI.git -
Building the project / Downloading pre-built binaries.
This project uses Maven as it's build tool.
If you don't have Maven installed on your local system or if you don't want to use Maven, there is a wrapper available in the repository itself. Just open your terminal in the project location and type the following:
./mvnw clean packageThis will build the project binaries in the
targetfolder of the repository.If you already have Maven installed, just run the following in the terminal opened in the project location
mvn clean packageThis will build the project binaries in the
targetfolder of the repository as well.Alternatively, you may check out our Releases page to download pre-built binaries.
-
Running the API locally
Open your terminal in the
targetfolder and type the following:java -jar license3j-api-x.x.x.jar
Once the application is running, you can interact with the API endpoints using tools like curl, Postman, Apidog, or a web browser (only for GET methods). Check the documentation for the endpoints and the requests that can be made.
NOTE: locally running the server requires PORT 8080 to be open and available. You can change the default behavior in application.properties available in src/main/resources
There is also a Dockerfile available which you can configure yourself to run it as a containerised application.
If you don't want to run it locally, a deployed instance is also available live on Render with the following enpoint configured: https://license3j-api.onrender.com
The documentation will use this as its endpoint.
You can view the documentation in Apidog
Working on it
Licensed under the Apache 2.0 license