LicenseGate - License system icon

LicenseGate - License system -----

The simplest way for developers to license their plugin



[​IMG]

[​IMG]


Description

LicenseGate is an open-source licensing tool for developers. Create and manage license keys for your plugins and mods with ease. Easily check the validity of a license using our java library or through our REST API.

So if anyone wants to test your plugin before paying, you no longer need to be worried about not getting paid. Trust, but verify!


Disclaimer: Usage on SpigotMC
You are not allowed to use any kind of license system in your premium plugins that you sell on SpigotMc.org! See: Premium Resource Guidelines | SpigotMC - High Performance Minecraft (section about DRM systems).


LicenseGate vs AdvancedLicense

LicenseGate is the successor of my previous very popular license system AdvancedLicense.

Here are the advantages/improvements of LicenseGate:
- Available as a free hosted service (you don't need to setup the service on your own infrastructure - but you still have the option to self-host)
- More secure (using RSA key signing)
- More features (advanced analytics, rate limiting, ...)
- Cleaner UI (Built using Svelte rather then PHP)



Features

✔ Easily manage your licenses through our web panel
✔ RSA key sigining to mitigate manipulation
✔ Fast integration of your API into your plugin
✔ Limit number of servers that can use a license
✔ Set expiration date for licenses
✔ Bind plugin to specific plugin
✔ Live stats about your licenses
... much more - check out our hosted version ...



Security considerations

How secure is licensing your plugins with LicenseGate actually? Within its limitations, LicenseGate is very secure. Meaning that everything that is within the control of LicenseGate is designed to be as secure as possible.

But the fact remains that Java executables can be decompiled and especially strings that contain the license key, can in most cases easily be detected, removed, or manipulated.
So no, if the attacker has enough technical knowledge and manages to get past your obfuscation (at least find the key) then LicenseGate won't help you.
That being said, there are a lot of scenarios where LicenseGate withstands various attacks from the outside like intercepting with fake license servers. Keep in mind, LicenseGate was never intended to be a 100% solution for not getting scammed but just makes it less likely and really most people who buy plugins don't have the technical knowledge to bypass the system.

Please join our Discord if you have any further ideas to increase security or have further questions/concerns about the system.

For a more indepth understanding of security implications see our docs:
Security considerations | LicenseGate



Setup

LicenseGate consists of two parts:
1. The web interface to manage and verify your license keys
2. The integration into your plugin

Web interface

The web interface can either be self-hosted ( instructions) or you can sign up for a free account on our public hosted version at app.licensegate.io

Once you are logged in to the web interface:
1. Go to "Account settings"
2. Under "RSA key-pair" click "Generate new key-pair"
3. Copy the public key that is shown - you will need it later
4. Go to "Manage licenses" and create your license
5. For "License Scope" you should set your plugin name

Integration into your plugin

Add as dependency:
Add LicenseGate as a dependency using maven:
Code (Text):
<repository>
  <id>respark-releases</id>
  <name>Respark - Maven Repository</name>
  <url>https://maven.respark.dev/releases</url>
</repository>

<dependency>
  <groupId>dev.respark.licensegate</groupId>
  <artifactId>license-gate</artifactId>
  <version>1.X.X</version>
</dependency>
or if you don't use maven, just download the LicenseGate jar (in the resrouce zip) and manually add it as a dependency.

Verify the license in your plugin's onEnable function:
Code (Java):
// Your public RSA key (can be found in your settings)
final String PUBLIC_KEY = "-----BEGIN PUBLIC KEY----- MIIB2d/..." ;

// Initialize the LicenseGate client
LicenseGate licenseGate = new LicenseGate ( "YOUR_USER_ID", PUBLIC_KEY ) ;

// Verify the license
// The "SCOPE" is usually your plugin name - you have to set the same string when creating the license
System. out. println ( "Verifying your license key..." ) ;
boolean isValid = licenseGate. verify ( "LICENSE_KEY", "SCOPE" ). isValid ( ) ;

// Take action
if (isValid ) {
  System. out. println ( "License valid!" ) ;
} else {
  System. out. println ( "License invalid!" ) ;
  Bukkit. getScheduler ( ). cancelTasks (plugin ) ;
  Bukkit. getPluginManager ( ). disablePlugin (plugin ) ;
}
You can also check why the license is invalid
Code (Java):
LicenseGate. ValidationType result = licenseGate. verify ( "LICENSE_KEY", "SCOPE" ) ;

// Handle the result
if (result == LicenseGate. ValidationType. VALID ) {
    // License is valid
} else if (result == LicenseGate. ValidationType. EXPIRED ) {
    // License is expired (e.g. prompt user to renew)
} else {
    // License is invalid (check documentation for all possible types)
}
Having issues? Enabled debug mode
Code (Java):
licenseGate. debug ( ). verify ( "LICENSE_KEY", "SCOPE" ) ;


Support

We only provide official support on our Discord and on GitHub


If you like our license system please consider giving a 5-star rating and starring it on GitHub ❤️


GitHub

Discord

Official documentation
Resource Information
Author:
----------
Total Downloads: 1,008
First Release: Feb 28, 2024
Last Update: Feb 28, 2024
Category: ---------------
All-Time Rating:
8 ratings
Find more info at licensegate.io...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings