I am testing Showcase API dashboard for license management of my custom module:
I generated two license keys for my custom module: 1) with my platform license key 2) without my platform license key
When activating these licenses (separately) on an Ignition Gateway that has my platform license key, in both cases, my module status on gateway is turned to Activated and notifyLicenseStateChanged on my hook class notifies the LicenseState mode switched from Trial to Activated. So, what is the role of "Platform License Key" field on Showcase API dashboard?
When I suspend a license key or delete the module id from a license key on Showcase API dashboard, no changes happen to License state of the custom module linked to that license key and it stays on Activated state. So, How can I restrict a customer in using that license key?
You cannot do this "live". Permanent licenses (6-characters) are not required to ever check in with the licensing servers after activation. If you suspend a license after activation, that won't be noticed by the user unless they "refresh" the activation deliberately.
Leased licenses (8-character keys) will eventually notice the change.
For practical purposes, you cannot "take back" a permanent license. If you want to be able to issue time-limited licenses, include an "expires" attribute in your license and look for it in your module code's license handling.
My own sales policy does not offer refunds unless the buyer de-activates the license first.
A leased license key (8-character) has an activation token. In addition to the license key, this token should be provided to the customer, right?
Also, for generating 8-character keys, there are parameters like "Check In" and "Expiration" on API dashboard, are these for live license status check-ins and license expiration since the last activation?
As for the extra parameters, not sure. I've only issued a pair of leased license keys, and I left those at default.
(I'm pretty sure you must issue the same kind of license key as the customer's platform key. I don't think you can use the leasing system to enforce cancellations on permanently licensed systems.)
To issue a time-limited 6-character license, I add "expires" parameter to my module license (as a pair of strings {name, value} on licensing API tool). To look for this parameter in my code, I found getModuleLicense method for LicenseState, but based on Javadoc it seems deprecated.
Could you please let me know, how can I access this parameter in my code?
Your IDE is lying to you; the deprecated part is relying on getModuleLicense to return a ModuleLicense (that interface is what's deprecated). If you always treat getModuleLicense as returning a com.inductiveautomation.ignition.common.licensing.LicenseDetails, then you're fine (and forwards compatible with 8.3).