|
10Duke Scale C++ Client
|
#include <DefaultLicensingClient.h>
Default implementation of tenduke::se::licensing::LicensingClient.
This implementation maintains OIDC-state automatically: If the OIDC state has expired, it first tries to refresh the state and if refresh fails then it re-logins the user. Also, if the request fails because of HTTP 401 Unauthorized, it does the same refresh-if-fails-re-login -routine.
| tenduke::se::licensing::DefaultLicensingClient::DefaultLicensingClient | ( | const std::shared_ptr<::tenduke::oidc::OIDCSession > & | oidc, |
| const std::shared_ptr<::tenduke::se::licensing::rest::ScaleLicensingApi > & | restApi, | ||
| const std::shared_ptr<::tenduke::se::licensing::MutableLeases > & | leases ) |
Constructs new instance.
| oidc | OIDC-session service |
| restApi | the low-level API to access the 10Duke Scale licensing REST API |
| leases | lease-cache |
|
overridevirtual |
Starts fluent license checkout.
Implements tenduke::se::licensing::LicensingClient.
|
overridevirtual |
Checks out licenses.
| parameters | - |
| tenduke::net::NetworkingException | (and subclasses) on networking issues (no network, host not found etc) |
| tenduke::jwt::JWTValidationException | when any returned license token fails to validate |
| tenduke::se::http::APIException | (and subclasses) when the request failed |
Implements tenduke::se::licensing::LicensingClient.
|
overridevirtual |
Starts fluent license checkout with license key.
| licenseKey | the license key |
Implements tenduke::se::licensing::LicensingClient.
|
overridevirtual |
Checks out licenses with license key.
| licenseKey | the license key |
| parameters | - |
| tenduke::net::NetworkingException | (and subclasses) on networking issues (no network, host not found etc) |
| tenduke::jwt::JWTValidationException | when any returned license token fails to validate |
| tenduke::se::http::APIException | (and subclasses) when the request failed |
Implements tenduke::se::licensing::LicensingClient.
|
overridevirtual |
Describe license key.
Overload, which provides default values for parameters paging and withMetadata.
| licenseKey | - |
Implements tenduke::se::licensing::LicensingClient.
|
overridevirtual |
Describe license key.
Describes licenses that a license key grants usage rights to. This endpoint can be called using only a license key. Current use of licenses checked out using a license key (client bindings) can be requested at: /actions/describe-license-key-client-bindings. Paging detail: The common case is having one or only a few licenses per license key. That means paging is likely not needed and requests to this endpoint can omit using offset and limit in that case.
| licenseKey | - |
| paging | - |
| withMetadata | - |
Implements tenduke::se::licensing::LicensingClient.
|
overridevirtual |
Starts fluent license heartbeat.
This method is used also to heartbeat metered leases (created from startMeteredLicenseUse*())
Implements tenduke::se::licensing::LicensingClient.
|
overridevirtual |
Heartbeats licenses.
This method is used also to heartbeat metered leases (created from startMeteredLicenseUse*())
| parameters | - |
| tenduke::net::NetworkingException | (and subclasses) on networking issues (no network, host not found etc) |
| tenduke::jwt::JWTValidationException | when any returned license token fails to validate |
| tenduke::se::http::APIException | (and subclasses) when the request failed |
Implements tenduke::se::licensing::LicensingClient.
|
overridevirtual |
Starts fluent license release.
This method is used also to release metered leases (created from startMeteredLicenseUse*())
Implements tenduke::se::licensing::LicensingClient.
|
overridevirtual |
Releases licenses.
This method is used also to release metered leases (created from startMeteredLicenseUse*())
| parameters | - |
| tenduke::net::NetworkingException | (and subclasses) on networking issues (no network, host not found etc) |
| tenduke::jwt::JWTValidationException | when any returned license token fails to validate |
| tenduke::se::http::APIException | (and subclasses) when the request failed |
Implements tenduke::se::licensing::LicensingClient.
|
overridevirtual |
Starts fluently building "start-metered-license-use"-request.
Implements tenduke::se::licensing::LicensingClient.
|
overridevirtual |
Starts metered license use.
| parameters | - |
| tenduke::net::NetworkingException | (and subclasses) on networking issues (no network, host not found etc) |
| tenduke::jwt::JWTValidationException | when any returned license token fails to validate |
| tenduke::se::http::APIException | (and subclasses) when the request failed |
Implements tenduke::se::licensing::LicensingClient.
|
overridevirtual |
Starts fluently building "start-metered-license-use-with-license-key"-request.
| licenseKey | the license key |
Implements tenduke::se::licensing::LicensingClient.
|
overridevirtual |
Starts metered license use with license key.
| licenseKey | the license key |
| parameters | - |
| tenduke::net::NetworkingException | (and subclasses) on networking issues (no network, host not found etc) |
| tenduke::jwt::JWTValidationException | when any returned license token fails to validate |
| tenduke::se::http::APIException | (and subclasses) when the request failed |
Implements tenduke::se::licensing::LicensingClient.