How to configure a PHP or ASP.NET license server for my application?

The Advanced Licensing Support can be easily integrated with your license server. The following explanations apply to the sample code linked at the end of this article.

Set the Licensing Library to use an Activation Server

In the Advanced Installer Licensing Registration Tab you should perform the following actions:

  • Enter the HTTP or HTTPS URL address to your license server into the “Server Url” field.
  • Select the “User specific customized license” format and select the license elements that your server will support.
  • Export the Public - Private key pair used to generate licenses using the “Export PEM” action. You must take safety measures to protect and encode this key based on your server needs before you upload it.

NoteChanges to the License elements must be reflected in server-side changes because the server is responsible for generating values for those elements.

License Request

When the end-user attempts to register your application, the licensing library will submit an HTTP request to the server with the following POST keys/values:

  • ID - the license ID that the end-user entered into the registration form.
  • COMP_ID - the registration computer ID (if supported) used to generate licenses that are invalid on other computers that the one used for registration.
  • TrialName - the licensing library name that may be used by the server if it needs to distinguish between applications.

The registration server must respond with the licensing elements (ID, Computer ID, Maintainance Plan, Expiration Date ....) as well as their digital signature.

Step 1 - Find the license with the specified ID in your database.

The provided license ID must be searched in the database to get details like Maintainance Plan, Expiration Date, No of previous activations, previous Computer IDs or any other element you want to use to allow/deny registrations.

Step 2 - Decide if the license request is legit.

If based on your database entries the server decides that the license request should be denied then it should respond with an HTTP response code larger than 500 and an error message.

Step 3 - Computing the digital license signature.

The Signature element of the license is the Base64 encoded RSA signature of the other license elements (hashed using the SHA1 function).

All the other license elements and their values should be merged in alphabetical order into a UTF-16LE encoded string like:

COMP_ID=1283391946329685EXP=12/31/2014ID=john@example.com

ImportantThe license element name and its value should be separated by =.

Step 4 - Respond with the license elements.

Once the server has computed the signature element (SIGN), it's ready to respond with a message composed of the license elements and their values. An element name must be separated by its value using =. Element-value pairs must be separated using ;.

ImportantComputer ID element may be omitted from this response.

Sample server response message:

ID=john@example.com;SIGN=QeDQqqhp6zVB2I5fnu5AgndUMVXj9uD5UEX7vvENr6VLFoPEOsaO70fIIUX572dr

Topics