Navigation: Create Ebooks And Publications > Security and Trial Options For Ebooks and Apps > Validation of User Licenses |
|
Adding License Validation to Your Ebooks or Publications
HTML Executable empowers you to enhance your ebooks or publications by incorporating license validation. This validation process ensures the verification of the end user's registration key before granting access to the ebook. By periodically performing validation, you gain control over the usage of your ebook, enabling you to remotely block access in cases of fraudulent purchases or refunds.
To integrate a validation process into your ebook, follow these steps:
1)Open the Certificate Manager.
2)Double-click on a certificate.
3)Select the "Validation" tab.
📣 Note: This option is available only for online activation. |
⚠️ Warning: End users must have an active internet connection to perform validation. Validation requires a remote web server with the HTML Executable Activation Kit installed or an active subscription to our ebook protection service, Protect Ebook .net. |
About the Validation Process
The validation process is automated, where the publication seamlessly interacts with the activation server. During validation, the publication transmits the activation key, registration key, and unique system ID to the activation server. No personal data is sent.
The activation server scrutinizes the received information and queries the user's account in the databases. If the account is marked as "blocked" or an error occurs, validation is negative. Conversely, if the account is valid, the activation server issues a validation code. The publication subsequently verifies this code to determine access privileges.
> ℹ️ Info: Customers using a proxy server should configure it during activation. The publication will reuse the same proxy settings. Changing the proxy server can be done via the command line. |
Validating the User Key
You have the flexibility to select the validation frequency. For instance, you can check the validity every X times the publication is run by specifying the value for X (an integer, e.g., 3).
Advanced users can customize the validation process in two ways:
•Manually with HEScript calls: Compose your own HEScript scripts and invoke the validation process using the following HEScript code:
if not RunSimpleBooleanFunc("Trial.DoServerValidate", false) then
begin
// Actions to perform when the validation is unsuccessful, such as displaying an error message and exiting the publication
ShowMessage("Could not validate your license. Please ensure you have a valid subscription");
ExitPublication;
end;
•Using the OnKeyValidation event (in UserMain): Set the desired frequency, and your publication will trigger the UserMain.OnKeyValidation HEScript event, which you can customize on the User Scripting page.
function OnKeyValidation: Boolean;
begin
Result := True; // Returns True to perform validation
end;
Handling Invalid Key Validation
Choose the appropriate action if the validation is unsuccessful:
ØExit the publication: Displays an error message and exits.
ØReturn to the Trial state: The publication reverts to the Default certificate and exits, erasing the registration information. However, this option is not recommended.
ØCall the OnKeyNotValidated HEScript event (in UserMain): The publication invokes the UserMain.OnKeyNotValidated HEScript event, which you should customize on the User Scripting page.
function OnKeyNotValidated: Boolean;
begin
MessageBox("This program will close now because it could not verify your license", "User Error", MB_OK);
Result := True; // Returns True to exit the program
end;
ℹ️ Info: You can easily customize messages related to the validation process using the Language page. The publication utilizes resource strings named `SValidationXXX.` |