10Duke Scale C++ Client
Loading...
Searching...
No Matches
DefaultLicenseHeartbeatRequest.h
1#ifndef TENDUKE_SE_LICENSING_REST_DEFAULTLICENSEHEARTBEATREQUEST_H
2#define TENDUKE_SE_LICENSING_REST_DEFAULTLICENSEHEARTBEATREQUEST_H
3
4#include "./AbstractLicenseRequest.h"
5#include "./LicenseHeartbeatRequest.h"
6#include "../../api/licenses/JWTToLease.h"
7#include "../../api/licenses/heartbeat/LicenseHeartbeatParameters.h"
8#include "../../api/licenses/heartbeat/LicenseHeartbeatResponse.h"
9#include "../../../config/BackendConfiguration.h"
10#include "../../../config/ClientProperties.h"
11#include "http/HTTPClient.h"
12#include "http/HTTPRequestAuthenticator.h"
13#include "http/HTTPResponseToException.h"
14#include "json/JSONParser.h"
15#include "jwt/JWTParser.h"
16
17#include <memory>
18
19namespace tenduke { namespace se { namespace licensing { namespace rest {
20
21
27{
28public:
45 const std::shared_ptr<const ::tenduke::se::ClientProperties> &clientProperties,
46 const std::shared_ptr<const ::tenduke::se::BackendConfiguration> &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::http::HTTPResponseToException> &throwException,
50 const std::shared_ptr<const ::tenduke::json::JSONParser> &jsonParser,
51 const std::shared_ptr<const ::tenduke::jwt::JWTParser> &jwtParser,
52 const std::shared_ptr<const ::tenduke::se::licensing::JWTToLease> &jwtToLease,
55 );
56
57 // tenduke::se::licensing::rest::LicenseCheckoutRequest implementation
58public:
60
61protected:
68
69private:
70 const ::tenduke::se::licensing::LicenseHeartbeatParameters parameters;
71
72 const std::shared_ptr<const ::tenduke::se::licensing::JWTToLease> createLease;
73 const std::shared_ptr<const ::tenduke::jwt::JWTParser> parseJWT;
74};
75
76
77}}}}
78
79#endif //TENDUKE_SE_LICENSING_REST_DEFAULTLICENSEHEARTBEATREQUEST_H
Interface for 10Duke Scale API-requests.
Definition APIRequest.h:12
A tenduke::se::APIRequest, which uses tenduke::oidc::OIDCSession to maintain request authorization.
Definition StatefulAPIRequest.h:27
Parameters for license heartbeat request.
Definition LicenseHeartbeatParameters.h:15
Response from license heartbeat call.
Definition LicenseHeartbeatResponse.h:19
Abstract base class for license-related requests.
Definition AbstractLicenseRequest.h:20
static const bool NON_METERED
Magic value to indicate that this is normal (not metered) license request.
Definition AbstractLicenseRequest.h:28
static const std::string NO_LICENSE_KEY
Magic value to indicate that this is not a license key request.
Definition AbstractLicenseRequest.h:23
const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > httpRequestAuthenticator
HTTP-request authenticator.
Definition AbstractLicenseRequest.h:85
const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > throwException
Throw-exception.
Definition AbstractLicenseRequest.h:87
const std::shared_ptr< const ::tenduke::se::ClientProperties > clientProperties
Client properties.
Definition AbstractLicenseRequest.h:77
const std::shared_ptr< const ::tenduke::se::BackendConfiguration > configuration
Config.
Definition AbstractLicenseRequest.h:79
Default implementation of tenduke::se::licensing::rest::LicenseHeartbeatRequest.
Definition DefaultLicenseHeartbeatRequest.h:27
::tenduke::se::licensing::LicenseHeartbeatResponse fromJSON(const std::string &jsonDocument) const
Parses the response entity from JSON message body.
Definition DefaultLicenseHeartbeatRequest.cpp:41
::tenduke::se::licensing::LicenseHeartbeatResponse execute() override
Execute the request synchronously.
Definition DefaultLicenseHeartbeatRequest.cpp:77
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7