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

Detailed Description

Low-level client for licensing operations using 10Duke authz-API.

These services are fairly low-level and are used by higher level services: interface LicensingClient and its default implementation StatefulLicensingClient. Most users should be using the higher level services.

Classes

class  AbstractAuthzApiRequest
 Base class for authz-API HTTP requests. More...
class  AbstractLicenseTokenAuthzApiRequest
 Base class for licensing requests, which return tokens. More...
class  AuthzLicensingClient
 Low-level client for licensing operations using 10Duke /authz/-API. More...
class  DefaultAuthzLicensingClient
 Default implementation of tenduke::ee::licensing::authzapi::AuthzLicensingClient. More...
class  DefaultLicenseCheckoutRequest
 Default implementation of tenduke::ee::licensing::LicenseCheckoutRequest. More...
class  DefaultLicenseReleaseRequest
 Default implementation of tenduke::ee::licensing::LicenseReleaseRequest. More...
class  DefaultLicenseRenewRequest
 Default implementation of tenduke::ee::licensing::authzapi::LicenseRenewRequest. More...
class  LicensingRequest
 Licensing-related request. More...
class  LicensingRequestFailure
 Thrown when there is some licensing-related error. More...

Typedefs

typedef tenduke::ee::licensing::authzapi::LicensingRequest< tenduke::ee::licensing::LicenseCheckoutResponse > LicenseCheckoutRequest
 License checkout request.
typedef tenduke::ee::licensing::authzapi::LicensingRequest< tenduke::ee::licensing::LicenseReleaseResponse > LicenseReleaseRequest
 Request for license release.
typedef ::tenduke::ee::licensing::authzapi::LicensingRequest<::tenduke::ee::licensing::LicenseRenewResponse > LicenseRenewRequest
 Request for license renewal.

Functions

void appendAuthzAttribute (std::string &target, const char *name, const std::string &value, const char *description)
 Helpers for /authz query parameter values with attributes, e.g.
std::string mkAuthzIdWithName (const std::string &id, const std::string &name, const char *description)
 Builds a value with an optional name attribute: <id> or <id>;name=<name>.

Function Documentation

◆ appendAuthzAttribute()

void tenduke::ee::licensing::authzapi::appendAuthzAttribute ( std::string & target,
const char * name,
const std::string & value,
const char * description )

Helpers for /authz query parameter values with attributes, e.g.

hw=<id>;name=<name> or <item>=;version=<v>.

The server decodes the query parameter value once, splits it on ;, and splits each attribute on its first =. It does not decode the attribute values again, so they are sent as is: URLBuilder encodes the whole parameter value. A ; in a value cannot be escaped, because the server always reads it as an attribute separator: it is replaced with _, and a warning is logged. = in a value is sent as is. Appends attribute ;<name>=<value>.

Parameters
targetthe parameter value to append to
namename of the attribute
valuevalue of the attribute, sent as is, except that ; is replaced with _
descriptiondescription of the value for the warning, e.g. "item version"

◆ mkAuthzIdWithName()

std::string tenduke::ee::licensing::authzapi::mkAuthzIdWithName ( const std::string & id,
const std::string & name,
const char * description )

Builds a value with an optional name attribute: <id> or <id>;name=<name>.

Parameters
idthe id, sent as is, except that ; is replaced with _
namethe name, sent as is, except that ; is replaced with _. Empty means no name attribute.
descriptiondescription of the value for the warning, e.g. "hardware"