diff --git a/PAM/ssh/include/rublon/core_handler.hpp b/PAM/ssh/include/rublon/core_handler.hpp index a3d0cfc..51aaea1 100755 --- a/PAM/ssh/include/rublon/core_handler.hpp +++ b/PAM/ssh/include/rublon/core_handler.hpp @@ -1,6 +1,5 @@ #pragma once -#include #include #include #include @@ -18,7 +17,6 @@ namespace rublon { template < typename HttpHandler = CURL > class CoreHandler : public CoreHandlerInterface< CoreHandler< HttpHandler > > { Configuration _config; - mutable std::unique_ptr< WebSocket > _ws; void signRequest(Request & request) const { @@ -69,12 +67,8 @@ class CoreHandler : public CoreHandlerInterface< CoreHandler< HttpHandler > > { public: CoreHandler() = delete; - CoreHandler(const Configuration & config) : _config{config}, http{} {} - // CoreHandler(const CoreHandler &rhs) = delete; - // CoreHandler(CoreHandler &&rhs) = delete; - tl::expected< std::reference_wrapper< const Response >, Error > validateSignature(const Response & response) const { if(hasSignature(response) and signatureIsNatValid(response)) { log(LogLevel::Error, "rublon core response is not signed properly"); diff --git a/PAM/ssh/include/rublon/curl.hpp b/PAM/ssh/include/rublon/curl.hpp index 9ad53af..d218b90 100755 --- a/PAM/ssh/include/rublon/curl.hpp +++ b/PAM/ssh/include/rublon/curl.hpp @@ -9,14 +9,6 @@ namespace rublon { -inline bool replace(std::string& str, const std::string& from, const std::string& to) { - size_t start_pos = str.find(from); - if(start_pos == std::string::npos) - return false; - str.replace(start_pos, from.length(), to); - return true; -} - namespace { size_t WriteMemoryCallback(void * contents, size_t size, size_t nmemb, void * userp) { const size_t realsize = size * nmemb; @@ -102,7 +94,7 @@ class CURL { long http_code = 0; curl_easy_getinfo(curl.get(), CURLINFO_RESPONSE_CODE, &http_code); - + if(http_code >= 500) { log(LogLevel::Error, "%s response with code %d ", "CURL", http_code); return tl::unexpected{ConnectionError{ConnectionError::HttpError, http_code}}; diff --git a/PAM/ssh/include/rublon/json.hpp b/PAM/ssh/include/rublon/json.hpp index 16d85de..cfd75af 100755 --- a/PAM/ssh/include/rublon/json.hpp +++ b/PAM/ssh/include/rublon/json.hpp @@ -1,5 +1,6 @@ #pragma once -#include "rublon/utils.hpp" + +#include #include #include #include @@ -7,7 +8,6 @@ #include #include -#include namespace rublon { struct RapidJSONPMRAlloc {