Offline Activation Key Validation
Hi.
I'm trying to implement offline activation and I have the following problem.
When user enters both Activation Key and Computer Key, I'm passing them to the generated LicenseValidator.ValidateLicense(…) method. If this method returns true, I consider the license keys valid and store them. What I've found is that Activation Key can be completely unrelated to the Computer Key, LicenseValidator.ValidateLicense(…) completely skips Activation Key check when Computer Key is present.
The problem is that stored Activation Key is used by LicenseValidator at startup for license revocation and subscription reactivation checks, so I need a valid Activation Key in order for this to work.
How do I check that both Activation Key and Computer Key are correct? If I pass only Activation Key without Computer Key (string.Empty or null) to LicenseValidator.ValidateLicense(…) and then vice versa and then combine the results, will I achieve the desired outcome or this does not guarantee that key pair is valid?
-
Official comment
When validating a license, what matters is the Computer Key.
It's true that in the case of Offline activation, the Activation Key is not validated but that should not cause any issue.
Now if the computer is offline, the user cannot really do a revocation or subscription renewal since they cannot contact the server. If the computer is online and if they do have an invalid Activation Key, the subscription renewal and/or deactivation will fail or at least not have the desired effect.
That said, if you really see the need to validate an Activation Key when performing an offline activation, you can simply call LicenseValidator.ValidateLicense as you discovered.
Comment actions -
> at least not have the desired effect
That bothers me. If customer has two Activation Keys (A & B) with different features for the same product and by mistake enters different Activation Key (B) than the one was used for offline activation (A), we'll have no way to warn him about it. And when the time comes to renew the subscription A, QLM in fact will reactivate B key with different features.
Of course we can solve it manually when customer reaches to us after he discovers that something is wrong, but that's confusing anyway.
Please sign in to leave a comment.
Comments
3 comments