10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
tenduke::ee::licensing::Lease Class Reference

#include <Lease.h>

Detailed Description

Describes checked out licensed item.

Public Member Functions

 Lease ()
 Constructs new instance.
 
 Lease (std::string name, std::string token, std::string consumedVersion, std::string licenseId, std::string leaseId, std::int64_t leaseExpiresEpochS, std::string requestedVersion="", std::string hardwareId="", std::int64_t issuedAtEpochS=0, std::string issuer="", const std::map< std::string, std::string > &licenseProperties={}, std::int64_t licenseValidFromEpochS=0, std::int64_t licenseValidUntilEpochS=INT64_MAX, std::int64_t recommendedRefreshTimeEpochS=0, std::string subject="", const std::vector< std::string > aggregatedItems={}, const std::map< std::string, std::string > &additionalClaims={})
 Constructs new instance.
 

Public Attributes

const std::map< std::string, std::string > additionalClaims
 Additional claims.
 
const std::vector< std::string > aggregatedItems
 Aggregated licensed items, if any.
 
const std::string consumedVersion
 Consumed version.
 
const std::string hardwareId
 The ID of the computer or hardware on which the license is being consumed.
 
const std::int64_t issuedAtEpochS
 The time when the token was issued (the lease was created).
 
const std::string issuer
 The URL of your 10Duke Enterprise deployment, the issuer of the token.
 
const std::int64_t leaseExpiresEpochS
 Expiration time of the the lease in epoch-seconds.
 
const std::string leaseId
 Id of the lease.
 
const std::string licenseId
 Id of the license.
 
const std::map< std::string, std::string > licenseProperties
 If available, license properties defined for the license as custom name-value pairs.
 
const std::int64_t licenseValidFromEpochS
 The validity start time of the license that this token is consuming.
 
const std::int64_t licenseValidUntilEpochS
 The validity end time of the license that this token is consuming.
 
const std::string name
 Name of the licensed item.
 
const std::int64_t recommendedRefreshTimeEpochS
 The recommended token refresh time.
 
const std::string requestedVersion
 Requested version.
 
const std::string subject
 The ID of the end user’s user account or the unique ID of the client.
 
const std::string token
 The full JWT from which this data were parsed from.
 

Constructor & Destructor Documentation

◆ Lease()

tenduke::ee::licensing::Lease::Lease ( std::string  name,
std::string  token,
std::string  consumedVersion,
std::string  licenseId,
std::string  leaseId,
std::int64_t  leaseExpiresEpochS,
std::string  requestedVersion = "",
std::string  hardwareId = "",
std::int64_t  issuedAtEpochS = 0,
std::string  issuer = "",
const std::map< std::string, std::string > &  licenseProperties = {},
std::int64_t  licenseValidFromEpochS = 0,
std::int64_t  licenseValidUntilEpochS = INT64_MAX,
std::int64_t  recommendedRefreshTimeEpochS = 0,
std::string  subject = "",
const std::vector< std::string >  aggregatedItems = {},
const std::map< std::string, std::string > &  additionalClaims = {} 
)
inline

Constructs new instance.

Parameters
name-
token-
consumedVersion-
licenseId-
leaseId-
leaseExpiresEpochS-
requestedVersion-
hardwareId-
issuedAtEpochS-
issuer-
licenseProperties-
licenseValidFromEpochS-
licenseValidUntilEpochS-
recommendedRefreshTimeEpochS-
subject-
aggregatedItems-
additionalClaims-

Member Data Documentation

◆ additionalClaims

const std::map<std::string, std::string> tenduke::ee::licensing::Lease::additionalClaims

Additional claims.

Contains unrecognized claims, typically from customizations. The values are strings (even if the claim really is numeric). If the claim was a JSON object or array, then the content is JSON.

IMPORTANT NOTE: Newer versions of the client MAY add named fields for an additional claim, thus causing issue, where the code compiles and mostly works, but when the code relies on additionalClaims, the value is not found (as it is parsed to a named field). If you rely on additionalClaims you should have tests in place to ensure newer version of the client does not break your code.

◆ issuedAtEpochS

const std::int64_t tenduke::ee::licensing::Lease::issuedAtEpochS

The time when the token was issued (the lease was created).

In epoch-seconds.

◆ issuer

const std::string tenduke::ee::licensing::Lease::issuer

The URL of your 10Duke Enterprise deployment, the issuer of the token.

Depending on your deployment configuration, iss may specify the sub content instead and the sub field is not included.

◆ licenseProperties

const std::map<std::string, std::string> tenduke::ee::licensing::Lease::licenseProperties

If available, license properties defined for the license as custom name-value pairs.

The license property feature must be enabled in your deployment configuration.

◆ licenseValidFromEpochS

const std::int64_t tenduke::ee::licensing::Lease::licenseValidFromEpochS

The validity start time of the license that this token is consuming.

In epoch-seconds.

◆ licenseValidUntilEpochS

const std::int64_t tenduke::ee::licensing::Lease::licenseValidUntilEpochS

The validity end time of the license that this token is consuming.

In epoch-seconds. INT64_MAX indicates "forever valid".

◆ recommendedRefreshTimeEpochS

const std::int64_t tenduke::ee::licensing::Lease::recommendedRefreshTimeEpochS

The recommended token refresh time.

This should be the same as or earlier than the token expiry time. You can configure your client application to rely on the rfr value to renew the license lease. In epoch-seconds.


The documentation for this class was generated from the following file: