Bundle Manager
BundleManager
Provides a high-level interface for managing bundle licenses, including local bundle licenses. The BundleManager is required to work with local bundle license files. This class can share the same license file with the LicenseManager, as both classes are designed to not overwrite each other's data.
Typescript definitions are provided for the arguments and return types of the class methods.
To import the BundleManager class use:
const { BundleManager } = require('@licensespring/node-sdk');To create an instance:
const bundleManager = new BundleManager({
apiKey: '12345678-4bfe-4e3a-8737-757004d6294c',
sharedKey: 'eYuHrlajvIVTiSFIXpxpKhw78f4Ewy-00-12345678',
appName: 'js-sdk-test-1',
appVersion: '0.0.1',
productCode: 'bkp',
/** NOTE: the following properties are set to their default values by the SDK and can be overriden manually: */
// apiPath: 'http://api.dev.licensespring.com/api/v4',
// publicKey: '...',
});The constructor takes the a single argument of the following type:
{
/** your Licensespring API key */
apiKey: string,
/** your Licensespring API Shared key **/
sharedKey: string,
/** custom name for your application */
appName: string,
/** custom version string for your application */
appVersion: string,
/** your product short code */
productCode: string,
/** your Air Gap Activation key (optional) */
airGapKey?: string,
/** override for License API url (default is https://api.licensespring.com/api/v4/) **/
apiPath?: string,
/** override for License API public key (default is pub key for api.licensespring.com) **/
publicKey?: string,
/** override for License File filename (default is "License") */
filename?: string,
/** override for License File path (default is current directory) */
filePath?: string,
/** override for License File encryption key */
fileKey?: string,
/** override for license grace period duration in hours (default is 24) */
gracePeriod?: number,
/** override for License File guard file (default is false) */
isGuardFileEnabled?: boolean,
/** override for Hardware ID calculation method (default is 0, for more info see "Hardware ID" section) */
hardwareIDMethod?: number,
/** a custom provided Hardware ID (overrides HWID calculation) */
hardwareID?: string,
/** boolean for enabling tpm licensing for your application */
isTpmEnabled?: boolean,
}Methods
Methods listed here which take a license payload are the similar to corresponding methods in the License API class, except that product and hardware_id do not have to be specified in the payload as they are provided by the Bundle Manager object.
Check Bundle License
See: Check Bundle
Activate Bundle License Online
Deactivate License Online
Activate Bundle License Offline
Deactivate Bundle License Offline
Performs an offline deactivation
Change Password
See: Change Password
Get Product Versions
See: Get Product Versions
Get Product Installation File
Get Single Sign-On URL
See: Single Sign On URL
License Utility Methods
The following methods on the BundleManager class take a single argument which is the license object returned from a license activation, a license check or parsed from the license file.
Checks if License is enabled, active and not expired:
Returns days remaining in maintenance period:
Returns days remaining in license validity period:
License File
See License File
Last updated
Was this helpful?