remove Context::augment() because it is no longer necessary.

JSON-156
Roker 3 years ago
parent fd54377ae2
commit 7f23109544

@ -12,7 +12,6 @@ public:
virtual ~Context() = default;
virtual bool verify_security_token(const std::string& token) const = 0;
virtual void augment(json_spirit::Object& returnObject) = 0;
// Cache a certain function call. See JSON-155.
virtual void cache(const std::string& func_name, const std::function<void(PEP_SESSION)>& fn) = 0;

@ -209,7 +209,6 @@ public:
rs.emplace_back("outParams", std::move(out_params));
rs.emplace_back("return", std::move(ret));
context->augment(rs); // used e.g. add some debug infos to the status return value
context->clear(); // clear all stored values, if any.
return rs;

@ -341,13 +341,6 @@ bool JsonAdapter::verify_security_token(const std::string& s) const
}
void JsonAdapter::augment(json_spirit::Object& returnObject)
{
check_guard();
// nothing to do anymore.
}
void JsonAdapter::cache(const std::string& fn_name, const std::function<void(PEP_SESSION)>& func)
{
i->session_registry->add_to_cache(fn_name, func);

@ -75,8 +75,6 @@ public:
// returns 'true' if 's' is the security token created by the function above.
virtual bool verify_security_token(const std::string& s) const override;
virtual void augment(json_spirit::Object& returnObject) override;
virtual void cache(const std::string& fn_name, const std::function<void(PEP_SESSION)>& func) override;
// returns the version of the JsonAdapter
@ -96,8 +94,8 @@ public:
static JsonAdapter& getInstance();
static SessionRegistry& getSessionRegistry();
static SessionRegistry& getSessionRegistry();
JsonAdapter& startup(::messageToSend_t messageToSend);
protected:

@ -28,7 +28,6 @@ class DummyContext : public Context
{
public:
virtual bool verify_security_token(const std::string& token) const override { return true; }
virtual void augment(js::Object&) override { /* do nothing */ }
virtual void cache(const std::string& func_name, const std::function<void(PEP_SESSION)>& fn) override
{

Loading…
Cancel
Save