Documentation

Integration

This guide explains how to integrate License Activation Manager into your own application to enforce licensing and manage software activation.

Core Concepts

License Activation Manager uses two key concepts to manage software licensing...

Activation Key

An activation key is a unique code issued from License Activation Manager to your customers that links to single license. The customer uses this activation key to activate license and download license token.

The activation key is typically provided to customers through email after purchase. It is meant to be used during the initial activation process.

License Token

A license token is a string that contains all the license data and its cryptographic signature. The license token represents the actual license with all its properties.

Your application stores, validates signature and uses this license token to verify the license validity and enforce its restrictions.

Responsibilities

Licensing responsibilities are split:

  • License Activation Manager is responsible for creating license tokens and signing them with a private cryptographic key. It ensures that all license data is properly encoded and secured so it can't be tampered with.
  • Your Application is responsible for validating the license token signature using the public key and enforcing all license rules. This includes checking expiration dates, enabled features and feature limitations defined in the license token.

Token Validation Process

To use a license token in your application, you must validate its signature to ensure it hasn't been tampered with. The validation process involves several steps:

Step 1: Split the Token

A license token consists of two parts separated by a colon (:):

[base64-encoded-data]:[base64-encoded-signature]

Example token:

eyJDdXN0b21lciI6eyJOYW1lIjoiSm9obiBEb2UiLCJFbWFpbCI6ImpvaG4uZG9lQGV4YW1wbGUuY29tIiwiUGhvbmUiOm51bGwsIkFkZHJlc3NMaW5lUHJpbWFyeSI6bnVsbCwiQWRkcmVzc0xpbmVTZWNvbmRhcnkiOm51bGwsIlN0cmVldE51bWJlciI6bnVsbCwiUG9zdGFsQ29kZSI6bnVsbCwiQ2l0eSI6bnVsbCwiU3RhdGVPclJlZ2lvbiI6bnVsbCwiQ291bnRyeSI6bnVsbH0sIkFjdGl2YXRpb25LZXkiOiJEOTgyOTg0NS00MDhDLTQ0Q0ItQkQ0NC01MDVGQkZDNUMwM0EiLCJUeXBlIjoxLCJFeHBpcmF0aW9uRGF0ZVRpbWUiOm51bGwsIkFjdGl2YXRlZERhdGVUaW1lIjoiMjAyNi0xMC0yNVQxNzowMjowNC40MTgxMTYyKzAxOjAwIiwiQWN0aXZhdGVkRnJvbUlwQWRkcmVzcyI6bnVsbCwiTGltaXRhdGlvbnMiOlt7IkNvZGUiOiJNQVhfUFJPSkVDVFMiLCJWYWx1ZSI6NX1dLCJGZWF0dXJlcyI6W3siQ29kZSI6IkRFQlVHR0VSIn0seyJDb2RlIjoiSURFIn1dfQ==:eqa2gwfF0xNsh2UFo3BH0PqyzoQzeZGTqw8SkBeC40OB1oJMLW8ZVQZsmoaORS75uABs6CzHNkUlzySXu7SnawhBJcfJy1j/SPht9FYCIEoLuxBOjN+OE/zkz2z93wBpro9JgGezJmU5VOOCtzTGX77kR8q6vLjHAFnaCPY1EqhT5cKKI7D8uVNrPJWxTEySrd3IDsvkCq8ZSNSULFQn4vF5YCnk7riTET/zGyAH9M6ToJA7yKxOTiWZvezf4CWi+HkQTSdof8i/zwgL1nf1wiY1g06W2eWAiKd8aSz2xNJFYrQS5pU4FAmoWLH6thIhPjWbUEAvxFdAcXtpq8TBUQ==

Step 2: Decode and Validate Signature

Split the token by the colon character and decode both parts from Base64. Then validate the data portion against the signature using:

  • Algorithm: SHA256
  • Padding: PKCS1
  • Public Key (see below)

Use the following RSA public key for signature validation:

-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEAo7Wsvc6Fs9KpcfwFmrrlsovLOHrJKcb1uO/CwEa7dx5LDeUhSjHY
reb81md2xcn3uuLNA5a1FTnjTp95ckhCms/w/IAnwTC1xInYekxx5pA9EQ9lisgr
B2JtgimfXpYaJm9Ss982CUeSQITjWQbKGpSQiuS0ic1Jdlxctfrd9qrNGfcTpSlD
8mdTq3WtPvgYfCxiQApa5mjPfi0NxDlGr6uqomLLGvV58ylA/3tAJdCVmftJRS4Q
CFwZnPXjFvW78KEDmTKjAnQ7n5qbWTlnGcRS/qEgth4f6hpLjlCK5AbVjMSvGy/J
m3jwXA2a2zPgNls+zZPMJEmzdqrZY3xKFQIDAQAB
-----END RSA PUBLIC KEY-----

Here is an example of how to validate the signature in C#:

new data = Convert.FromBase64String(tokenPart[0]);
new signature = Convert.FromBase64String(tokenPart[1]);
new publicKey = "-----BEGIN RSA PUBLIC KEY-----MIIBCgKCAQEAo7Wsvc6Fs9KpcfwFmrrlsovLOHrJKcb1...";

try
{
    using (var rsa = RSA.Create())
    {
        rsa.ImportFromPem(publicKey.AsSpan());

        return rsa.VerifyData(data, signature, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
    }
}
catch
{
    // Example: parameter "publicKey" is not a valid PEM string...
    // Or any other error occurs during validation process. In any case, we consider validation as failed.
    return false;
}

Step 3: Parse License Data

Once the signature is validated successfully, decode the data portion from Base64 and parse it as JSON. This gives you access to all license information.

{
  "Customer": {
    "Name": "John Doe",
    "Email": "john.doe@example.com",
    "Phone": null,
    "AddressLinePrimary": null,
    "AddressLineSecondary": null,
    "StreetNumber": null,
    "PostalCode": null,
    "City": null,
    "StateOrRegion": null,
    "Country": null
  },
  "ActivationKey": "D9829845-408C-44CB-BD44-505FBFC5C03A",
  "Type": 1,
  "ExpirationDateTime": null,
  "ActivatedDateTime": "2026-10-25T17:02:04.4181162+01:00",
  "ActivatedFromIpAddress": null,
  "Limitations": [
    {
      "Code": "MAX_PROJECTS",
      "Value": 5
    }
  ],
  "Features": [
    {
      "Code": "DEBUGGER"
    },
    {
      "Code": "IDE"
    }
  ]
}

Step 4: Enforce License Rules

With the validated license data, your application can now enforce licensing rules such as:

  • Check if the license is expired
  • Verify that enabled features are used
  • Enforce feature limitations (max users, sessions, etc.)
  • Restrict functionality based on license type

License Activation

There are multiple approaches your application can use to obtain and manage license tokens...

Integrated Activation

You can provide your end users with a seamless activation experience by building an activation form within your application:

  • Create a form where users enter their activation key
  • Your application communicates with the License Activation Manager API to activate the license
  • The API returns the license token
  • Your application stores the token locally

This approach provides the best user experience as users never leave your application to activate their license.

Manual Activation

Alternatively, you can direct users to activate their license manually:

  • Users visit the License Activation Manager portal directly
  • Users enter their activation key to activate the license
  • Users manually download or copy the license token
  • Users paste or upload the license token into your application

This approach is simpler to implement but requires more manual steps from the user. But also this functionality may be required if your software is installed in location without direct access to License Activation Manager.

Token Storage

Your application has complete flexibility in how and where to store the license token. Common approaches include:

  • Database: Store the token in a database for persistent, centralized management
  • File System: Store the token in a local file for simple, file-based licensing
  • Configuration: Embed the token in your application's configuration files

You are free to choose a storage method that best fits your application's architecture and requirements.

Design Philosophy

License Activation Manager uses industry-standard algorithms for signing and signature validation combined with Base64 encoding. This design choice ensures that license tokens can be easily integrated into any application regardless of the programming language or technology stack used.

By using well-known cryptographic standards (RSA with SHA256 and PKCS1 padding) and universal Base64 encoding, the license token format is platform-agnostic and does not require platform-specific libraries or frameworks.

With the provided examples and the help of modern Large Language Models (LLMs), you can quickly adapt the token validation logic to your specific software solution in any programming language you choose.


Unable to find the answer you are looking for? You can always contact us. Our support team is ready to help you with any questions about License Activation Manager integration and usage.