license-server-0.4.0 is not a library.
Simple License Server
Install
cargo install license-server
Usage
CLI
license-server 0.1.0
Simple license server
USAGE:
license-server.exe <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
generate Generate a license
help Prints this message or the help of the given subcommand(s)
serve Start the license server
validate Validate a license
- Set HMAC_SECRET env variable to your signing secret string or pass it via
-sparameter - Generate a license:
license-server generate -f 2000-1-1 -u 2030-1-1 -M K=V - Validate a license
license-server validate eyJsaWNlbnNlIjp7ImlkIjoiYmYwODAxNDctMTUyYS00M2M4LTg1OTMtMjI0OTA4ZTE1MzgwIiwibWV0YSI6eyJLIjoiViJ9LCJ2YWxpZF9mcm9tIjoiMjAwMC0wMS0wMSIsInZhbGlkX3VudGlsIjoiMjAzMC 0wMS0wMSJ9LCJzaWduYXR1cmUiOiJkMzFmOTM3OWM0OTZmZGM4NDMwZmIwNmZiYmY0ZTcwN2I1NGMwZGE4OTM5MjBlOGY1MDU4YmE1ODJmM2E5MDQzIn0= - Set LICENSE_API_KEY env variable to some secret string that will be used to secure
generateendpoint or pass it via-kparameter - Start a server
license-server serve -p 3000
API
Generate a license POST /generate
Input format:
Output format:
Validate a license POST /validate
Input format:
Results in 200 for valid license or 400 for invalid