#pragma once #include #include #include namespace rublon { class AuthenticationStep { protected: std::string _systemToken; std::string _tid; public: AuthenticationStep() = default; AuthenticationStep(std::string systemToken, std::string tid) : _systemToken{std::move(systemToken)}, _tid{std::move(tid)} {} protected: void addSystemToken(Document & body) const { auto & alloc = body.GetAllocator(); body.AddMember("systemToken", Value{this->_systemToken.c_str(), alloc}, alloc); } void addTid(Document & body) const { auto & alloc = body.GetAllocator(); body.AddMember("tid", Value{this->_tid.c_str(), alloc}, alloc); } void addAccessToken(Document & body, std::string_view token) const { auto & alloc = body.GetAllocator(); body.AddMember("accessToken", Value{token.data(), static_cast< unsigned >(token.length()), alloc}, alloc); } }; } // namespace rublon