10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
tenduke::ee::licensing::impl Namespace Reference

Detailed Description

Implementations of licensing related services.

Classes

class  DefaultLicenseTokens
 Default implementation of tenduke::ee::licensing::LicenseTokens. More...
class  DefaultOfflineLicenseTokenParser
class  KeyListSignatureValidator
 A tenduke::jwt::JWTSignatureValidator, which accepts the signature if any of the pre-configured keys verifies it. More...
class  KnownNameLicenseTokenParser
 A license token parser, which expects the licensed item name to be one given in constructor. More...
class  KnownNamesLicenseTokenParser
 A tenduke::ee::licensing::impl::LicenseTokenParser, which verifies the licensed item name from a set of known names. More...
class  LeaseOrError
 Describes whether given token is a lease or an error. More...
class  LicenseTokenParser
 Parses license token into tenduke::ee::licensing::Lease (or into tenduke::ee::licensing::LicensingError). More...
class  StatefulCheckoutRequest
 Stateful implementation of tenduke::ee::licensing::LicenseCheckoutRequest. More...
class  StatefulCheckoutRequestTemplate
 Common base for stateful checkout-like requests. More...
class  StatefulLicensingClient
 A tenduke::ee::licensing::LicensingClient, which automatically maintains OIDC-login session. More...
class  StatefulReleaseRequest
 Stateful implementation of tenduke::ee::licensing::LicenseReleaseRequest. More...
class  StatefulRenewRequest
 Stateful implementation of tenduke::ee::licensing::authzapi::LicenseRenewRequest. More...

Functions

template<typename ITEM>
std::vector< ITEM > oneItemPerName (const std::vector< ITEM > &items, const char *requestType)
 Returns the items with one item per licensed item name: if a name occurs several times, the last item of that name replaces the earlier ones, at the position of the first one.

Function Documentation

◆ oneItemPerName()

template<typename ITEM>
std::vector< ITEM > tenduke::ee::licensing::impl::oneItemPerName ( const std::vector< ITEM > & items,
const char * requestType )

Returns the items with one item per licensed item name: if a name occurs several times, the last item of that name replaces the earlier ones, at the position of the first one.

Logs a warning for each such name.

A response has at most one lease per licensed item, and the license server does not handle a request, which names the same item with different values, consistently: for example, a renew of two leases of the same item returns a lease id, which is not the id of the renewed lease, so the lease cannot be released.

This is internal, not part of the public API.

Template Parameters
ITEMitem type, which has the licensed item name in member name
Parameters
itemsthe items
requestTypethe type of the request for the warning, e.g. "checkout"
Returns
the items with one item per licensed item name