Use the Shelf Life token generator in DashO to create encrypted expiration tokens that an application can load at runtime. An external token lets you change the expiration or warning period without rebuilding the protected application.
Before you begin
- Obtain the Shelf Life activation-key file issued by PreEmptive.
- Configure the application to load an external token through the tokenSource setting of ShelfLifeCheck.
- For relative expiration, make sure the application supplies the same type of runtime start date expected by the token.
Generate a token
- Open the Shelf Life token generator in DashO.
- Select the Shelf Life activation-key file for the application.
- Configure an absolute expiration date or a relative expiration period.
- Optionally configure an absolute warning date or a warning period.
- Optionally add custom properties that the application can retrieve from the Token object.
- Review the values before distributing the token.
- Select Save to write the token to a file, or select Copy to place the encoded token text on the clipboard.
Choose an output method
| Option | Result | Typical use |
|---|---|---|
| Save | Writes the encoded token to a file. | Use when the application loads the token from a file or packaged resource. |
| Copy | Copies the encoded token text to the clipboard. | Use when the token will be placed in source code, a resource, a property file, or another managed text location. |
Load the generated token
Configure ShelfLifeCheck tokenSource to return a Reader for the saved file, resource, or encoded text. The Token API also provides getToken overloads for File, Reader, and String inputs.
Validate the token
- Run the application before the warning period and confirm normal behavior.
- Test a token in the warning period and confirm the expected warning or custom action.
- Test an expired token and confirm the expected expiration behavior.
- Replace the external token with a later expiration and confirm that the application accepts it without a rebuild.
Related articles
- Configure Application Expiration with Shelf Life
- Shelf Life Token Reference
- Configure Runtime Protection Checks in DashO