Time-Limited / Subscription licenses with Protection PLUS 5 SDK
Protection PLUS 5 SDK gives you a lot of flexibility in setting and validating license parameters. There are different ways to support subscription-based licensing with Protection PLUS 5 SDK, and this article gives one example.
If you look at our included sample applications, these use the Trigger Code Field to determine license type (PLUSManaged or PLUSNative), such as a subscription-based license. It arbitrarily uses a Trigger Code value of 11 to signify that this type of license is a subscription, which then uses business logic to validate the EffectiveEndDate field (PLUSManaged or PLUSNative) in the license file. This makes it easy to have other licensing types, such as a non-expiring license. An EffectiveEndDate can still be stored in the local license file, but your source code simply wouldn't need to validate against this date if the type is set to a non-expiring license.
In SOLO Server, to create a subscription license for X days, use the Product Wizard to create a Product Option for Protection PLUS 5 SDK with the following settings:
- Option Type: Activation Code with Days Left
- Trigger Code #: 11
- Days to D/L: 365 - This is set for a 1-year license, but accepts any number of days. A license generated from this Product Option will set a date field called Download Until. Although it is labeled Download Until, this date field can be used for multiple purposes, including setting the license expiration and limiting access to downloads through the Customer License Portal.
- Reset Expiration at Activation: Checking this option causes SOLO Server to set the Download Until date on the first successful activation rather than when the license is created. This ensures that the customer always gets their full subscription period.
The other fields can be adjusted or left at their defaults, and do not affect the subscription functionality.
When the license is created, it defaults to have 365 days. You can adjust this when you are manually adding a license through the Author Interface, or you can edit an existing license.
Again, we highly recommend looking at our included sample projects, and you can reference most of that source code to help you get started more quickly. There are some walkthroughs for the sample projects in the manual, which includes information on logging into our Test SOLO Server account if you want to view the Product Option settings we use.