#pragma once #include #include #include #include #include "../helpers/memory/Memory.hpp" class CUUIDToken { public: CUUIDToken(const std::string& uuid_, std::any data_, std::chrono::system_clock::duration expires); std::string getUUID(); std::any data; private: std::string uuid; std::chrono::system_clock::time_point expiresAt; friend class CTokenManager; }; class CTokenManager { public: std::string registerNewToken(std::any data, std::chrono::system_clock::duration expires); std::string getRandomUUID(); SP getToken(const std::string& uuid); void removeToken(SP token); private: std::unordered_map> m_mTokens; }; inline std::unique_ptr g_pTokenManager;