10Duke Enterprise C++ Client
|
#include <TendukeClient.h>
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:
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::LicensingClient > | licensing |
Licensing service. | |
const std::shared_ptr< tenduke::oidc::OIDCSession > | oidcSession |
Service for managing OIDC-session. | |
const std::shared_ptr< const tenduke::ee::licensing::LicenseTokens > | licenseTokens |
Service for managing leases, aka "license tokens". | |
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.
oidcSession | - |
licensingClient | - |
licenseTokens | - |
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.