10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
DefaultAuthzLicensingClient.h
1#ifndef TENDUKE_EE_LICENSING_AUTHZAPI_DEFAULTLICENSINGCLIENT_H
2#define TENDUKE_EE_LICENSING_AUTHZAPI_DEFAULTLICENSINGCLIENT_H
3
4#include "../AuthzLicensingClient.h"
5#include "../../LicensingConfiguration.h"
6
7#include "http/HTTPClient.h"
8#include "http/HTTPResponseToException.h"
9#include "jwt/JWTParser.h"
10
11namespace tenduke { namespace ee { namespace licensing { namespace authzapi {
12
13
23{
24public:
33 const std::shared_ptr<const tenduke::ee::licensing::LicensingConfiguration>& configuration,
34 std::shared_ptr<const tenduke::http::HTTPClient> httpClient,
35 std::shared_ptr<const tenduke::http::HTTPRequestAuthenticator> httpRequestAuthenticator,
36 std::shared_ptr<const tenduke::jwt::JWTParser> jwtParser
37 );
38
39 // tenduke::ee::licensing::LicensingClient interface
40public:
41 std::unique_ptr<tenduke::ee::licensing::authzapi::LicenseCheckoutRequest> checkout(const tenduke::ee::licensing::LicenseCheckoutParameters &parameters) const override;
42 std::unique_ptr<tenduke::ee::licensing::authzapi::LicenseReleaseRequest> release(const LicenseReleaseParameters &parameters) const override;
43 std::unique_ptr<::tenduke::ee::licensing::authzapi::LicenseRenewRequest> renew(const ::tenduke::ee::licensing::LicenseRenewParameters &parameters) const override;
44
45private:
46 const std::shared_ptr<const tenduke::ee::licensing::LicensingConfiguration> configuration;
47 const std::shared_ptr<const tenduke::http::HTTPClient> httpClient;
48 const std::shared_ptr<const tenduke::http::HTTPRequestAuthenticator> httpRequestAuthenticator;
49 const std::shared_ptr<const tenduke::jwt::JWTParser> jwtParser;
50 const std::shared_ptr<const ::tenduke::http::HTTPResponseToException> throwException;
51};
52
53
54}}}}
55
56#endif // TENDUKE_EE_LICENSING_AUTHZAPI_DEFAULTLICENSINGCLIENT_H
Parameters for license checkout request.
Definition LicenseCheckoutParameters.h:18
Parameters for license-release request.
Definition LicenseReleaseParameters.h:13
Low-level client for licensing operations using 10Duke /authz/-API.
Definition AuthzLicensingClient.h:27
Default implementation of tenduke::ee::licensing::authzapi::AuthzLicensingClient.
Definition DefaultAuthzLicensingClient.h:23
std::unique_ptr< tenduke::ee::licensing::authzapi::LicenseCheckoutRequest > checkout(const tenduke::ee::licensing::LicenseCheckoutParameters &parameters) const override
Checks out license(s).
Definition DefaultAuthzLicensingClient.cpp:39
std::unique_ptr< tenduke::ee::licensing::authzapi::LicenseReleaseRequest > release(const LicenseReleaseParameters &parameters) const override
Releases checked out license(s).
Definition DefaultAuthzLicensingClient.cpp:60
std::unique_ptr<::tenduke::ee::licensing::authzapi::LicenseRenewRequest > renew(const ::tenduke::ee::licensing::LicenseRenewParameters &parameters) const override
Renews leases of checked out license(s).
Definition DefaultAuthzLicensingClient.cpp:73
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4