10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
tenduke::ee::TendukeClient Struct Reference

#include <TendukeClient.h>

Detailed Description

The 10Duke Enterprise Client.

The client is container of multiple services. These services share some common state, currently the login session.

To create instance, it is easiest to use factory methods in createTendukeClientForBrowser.h, for example createClientUsingAutodiscovery(const std::string &,const std::string &,const std::string &,const ::tenduke::oidc::osbrowser::BrowserAuthenticationConfig &,const std::string &,const ::tenduke::ServiceConfiguration &).

The client maintains state (the login session), so keep the instance (or a copy of it) for the lifetime of the application.

After creation, you can use the client as follows:

auto tendukeClient = ...; // create the client
// Simple example to checkout two licenses:
auto checkoutResult = tendukeClient->licensing->checkoutLicenses()
.version("1.0.0")
.seat("license-1")
.seat("license-2)
.execute();

For further details see:

Public Member Functions

 TendukeClient (const std::shared_ptr< tenduke::oidc::OIDCSession > &oidcSession, const std::shared_ptr< tenduke::ee::licensing::LicensingClient > &licensingClient, const std::shared_ptr< tenduke::ee::licensing::LicenseTokens > &licenseTokens)
 Creates new instance.
 
std::string serializeState () const
 Serializes client state to JSON.
 

Public Attributes

const std::shared_ptr< tenduke::ee::licensing::LicensingClientlicensing
 Licensing service.
 
const std::shared_ptr< tenduke::oidc::OIDCSessionoidcSession
 Service for managing OIDC-session.
 
const std::shared_ptr< const tenduke::ee::licensing::LicenseTokenslicenseTokens
 Service for managing leases, aka "license tokens".
 

Constructor & Destructor Documentation

◆ TendukeClient()

tenduke::ee::TendukeClient::TendukeClient ( const std::shared_ptr< tenduke::oidc::OIDCSession > &  oidcSession,
const std::shared_ptr< tenduke::ee::licensing::LicensingClient > &  licensingClient,
const std::shared_ptr< tenduke::ee::licensing::LicenseTokens > &  licenseTokens 
)

Creates new instance.

Parameters
oidcSession-
licensingClient-
licenseTokens-

Member Function Documentation

◆ serializeState()

std::string tenduke::ee::TendukeClient::serializeState ( ) const

Serializes client state to JSON.

When the application is closed, the serialized state can be persisted to disk and when the application is started the state can be read back and used to bootstrap the client.

Currently only OIDC-state is serialized.


The documentation for this struct was generated from the following files: