What is a timed license?
A timed license is a license that has a fixed-duration, i.e. an expiration date. A timed license can be used to implement a variety of different time-based licensing models:
How do I implement a timed license?
Configuring a timed license type is simple. You will want to create a new Policy
resource, or modify an existing Policy, and set the Policy's
to the expiration timeframe that you would like to apply to any license which implements
the Policy moving forward.
Then, within your software, you will want to integrate the following request flow:
The duration of a Policy is measured in seconds:
|Timeframe||Duration in seconds|
When a license implements a fixed-duration Policy, the expiration will automatically
be applied based on the Policy's
duration and the license's
license.expiry = (license.created + policy.duration)
Once a license's
expiry has been reached, subsequent license validations will respond
EXPIRED validation code and the license will be considered invalid. A
license can be renewed at any time using the license's renew action.
When it comes to Software as a Service (SaaS) licensing, or other types of licenses with timed, renewable maintenance and servicing contracts, subscriptions are the way.
Subscription licenses can be implemented in a couple different ways. If you have a payment provider, such as Stripe, we recommend tethering the license's expiration date to the subscription period. This can be accomplished using webhooks.
Outside of a payment provider tether, a license's expiration can be extended at any time
using the renew license action. This can be used to automatically renew licenses.
When a license is renewed, its
expiry is extended by the Policy's
license.expiry += policy.duration
Timed trial licenses
You would implement this just like a regular timed license, except the Policy will likely have a shorter duration, and possibly a different set of entitlements. To determine if a license is a trial license within your software, you can compare the trial Policy's ID to the license's current policy relationship.
For trial licenses, it's recommended to set the Policy's fingerprint uniqueness
PER_POLICY to ensure that a particular machine
fingerprint cannot be shared across many trial licenses.
To convert a trial license, you can transfer the license to a different Policy.
Timed licenses can be configured to be offline-capable. To do so, configure the Policy to utilize a cryptographic signing or encryption scheme, which will allow you to verify the authenticity of license keys in offline environments. You can embed an expiration inside of the license key itself, which can be decoded and utilized offline.
|Perpetual License||Timed License||Floating License||Node‑locked License||Feature License|
|Activation Limits||Optional||Optional||> 0||1||Optional|
|Learn More||Learn More||Learn More||Learn More|