Labs64 / NetLicensing-Community

NetLicensing Community Support
https://netlicensing.io
MIT License
5 stars 1 forks source link

Validation for node locked licensing model #139

Closed Ponsanthini0708 closed 4 months ago

Ponsanthini0708 commented 4 months ago

I am trying do the validation for the node locked licensing model + subscription licensing model through a single licensee key. From the documentation , I can see that for nodelocked model we have to pass the nodeSecret which is created along with the product module number. But in tha validate API, I can see only three parameters which we can able to pass as below:

ValidationResult vRes = LicenseeService::validate(ctx, licenseeNumber, vParams);

How to validate the nodelocked license module by passing the nodeSecret and the productmoduleNumber?

r-brown commented 4 months ago

Hello @Ponsanthini0708 You can provide additional validation parameters for the product module using setProductModuleValidationParameters method:

    ValidationParameters vParams = ValidationParameters();
    vParams.setProductModuleValidationParameters(productModuleNumber, "paramKey", "paramValue");
    ValidationResult vres = LicenseeService::validate(ctx, licenseeNumber, vParams);

See also C++ demo at https://github.com/Labs64/NetLicensingClient-cpp/blob/master/client_demo/netlicensing_client_demo.cc#L372