Configuring the Activation
Last updated
Was this helpful?
Last updated
Was this helpful?
The license is represented by the Activation
object, and there should be only a single instance of the Activation
class created for every seat in your application (usually only one, in case your application needs to hold multiple activation instances for more products, see "Multiple Activations Support" page). The state of the Activation
can be accessed through the Activation.State
property.
The following command will create a new instance of the Activation
object in Uninitialized
state. Before configuring the activation, collect the Tenant ID and Licensing API URL from the Account -> API Credentials page in the UI.
There are the following configuration options available:
Tenant ID - ID of the tenant. Can be retrieved from the API Credentials page.
Product ID - the product for which we are implementing the licensing.
Seat ID - represents the machine, the user, or some other element which the license should be linked with. Because the seat ID usually depends on the information that is only available at runtime, it is configured as a function. We recommend using the functionality for the machine-specific seat ID.
Storage - stores licensing data that must be persisted on the machine where your application runs. For desktop applications, file-based storage is the common choice.
We recommend using the provided in our SDK, which securely stores license data using the Zentitle2Core library.
This implementation encrypts and protects your license data while storing it in the specified file location.
Online Activation - allows the license activation when there is a network connection to the Licensing server. For the online activation, the following options need to be configured:
Licensing API URL - Licensing API base URL
HTTP Client Factory - HttpClient callback providing an HTTP Client for executing the Licensing API calls. The factory method enables the implementation of the proper HTTP Client's lifetime management, depending on your app's type. See the for more details.
Offline Activation - In rare cases when a machine lacks a network connection but the license needs to be activated anyway, can be configured in your application.
Logging - to have access to the SDK's logs, your logger factory implementing the can be plugged in.
State Transition Callback - if you want to "hook your own code" into the activation's state transition logic, you can define a callback, which is executed after the state has been changed.
The following example shows how to set up online activation using device fingerprinting and secure storage to ensure a secure and reliable activation process: