/werbot-lime

🍋 light license-key server in 1 file

Primary LanguageGoMIT LicenseMIT

Go Report Card CodeFactor Docker

Installation

$ git clone https://github.com/werbot/lime.git

Setup

  1. Modify config for DB in config/config.go
  2. Update parameters for privateKey, publicKey in file license/license.go To generate new key pair use command go run main.go pkey

Run server

$ go run main.go server 

Available Commands:

  • healthcheck : Check healthcheck
  • help : Help about any command
  • server : Start license server
  • pkey : Generating key pair

Admin console

Link for admin console http://localhost:8080/admin/ default login - admin, password - admin

API list

  • GET /api/ping : Health server
  • POST /api/key : Generate new license
  • GET /api/key/:customer_id : Get active license
  • PATCH /api/key/:customer_id : Update license
  • POST /api/verify : Check status license

TODO

  • Generating license
  • Verification license
  • Auto-create and install license on the client
  • Command-line utility for generating key pair
  • Integration with Stripe
  • Example client
  • Admin console
  • Support IP address check
  • Support country check