10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
DefaultLicenseReleaseRequest.h
1#ifndef TENDUKE_EE_LICENSING_AUTHZAPI_DEFAULTLICENSERELEASEREQUEST_H
2#define TENDUKE_EE_LICENSING_AUTHZAPI_DEFAULTLICENSERELEASEREQUEST_H
3
4#include "../LicenseReleaseRequest.h"
5#include "../../LicensingConfiguration.h"
6#include "../../release/LicenseReleaseParameters.h"
7
8#include "http/HTTPClient.h"
9#include "http/HTTPRequestAuthenticator.h"
10#include "http/HTTPResponseToException.h"
11#include "jwt/JWTParser.h"
12
13#include <memory>
14#include <string>
15#include <vector>
16
17namespace tenduke { namespace ee { namespace licensing { namespace authzapi {
18
23{
24public:
35 const std::shared_ptr<const ::tenduke::http::HTTPClient> &httpClient,
36 const std::shared_ptr<const ::tenduke::http::HTTPRequestAuthenticator> &httpRequestAuthenticator,
37 const std::shared_ptr<const ::tenduke::http::HTTPResponseToException> &throwException,
38 const std::shared_ptr<const ::tenduke::jwt::JWTParser> &jwtParser,
39 const std::shared_ptr<const ::tenduke::ee::licensing::LicensingConfiguration> &configuration,
41 );
42
44
45protected:
52
60 virtual void parseSingleToken(
61 const std::string &token,
62 std::vector<std::string> &successfullyReleasedLeaseIds,
63 std::map<std::string, tenduke::ee::licensing::LicensingError> &errors
64 );
65
66private:
67 const std::shared_ptr<const tenduke::ee::licensing::LicensingConfiguration> configuration;
69
70 const std::shared_ptr<const tenduke::http::HTTPClient> http;
71 const std::shared_ptr<const tenduke::http::HTTPRequestAuthenticator> httpRequestAuthenticator;
72 const std::shared_ptr<const tenduke::jwt::JWTParser> parseJWT;
73 const std::shared_ptr<const tenduke::http::HTTPResponseToException> throwException;
74};
75
76}}}}
77
78#endif //TENDUKE_EE_LICENSING_AUTHZAPI_DEFAULTLICENSERELEASEREQUEST_H
Parameters for license-release request.
Definition LicenseReleaseParameters.h:13
Response from tenduke::ee::licensing::LicenseReleaseRequest.
Definition LicenseReleaseResponse.h:18
Default implementation of tenduke::ee::licensing::LicenseReleaseRequest.
Definition DefaultLicenseReleaseRequest.h:23
tenduke::ee::licensing::LicenseReleaseResponse execute() override
Execute the request synchronously.
Definition DefaultLicenseReleaseRequest.cpp:16
virtual tenduke::ee::licensing::LicenseReleaseResponse parseResponsePayload(const std::string &payload)
Parses response payload to tenduke::ee::licensing::LicenseReleaseResponse.
Definition DefaultLicenseReleaseRequest.cpp:97
virtual void parseSingleToken(const std::string &token, std::vector< std::string > &successfullyReleasedLeaseIds, std::map< std::string, tenduke::ee::licensing::LicensingError > &errors)
Parses single token from the response, and places the token either to successfullyReleasedLeaseIds or...
Definition DefaultLicenseReleaseRequest.cpp:50
Licensing-related request.
Definition LicensingRequest.h:13
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4