Add method to set authentication and change auth pointer to non-owning
This commit is contained in:
@@ -73,6 +73,7 @@ public:
|
|||||||
bool login(const std::string& username, const std::string& password,
|
bool login(const std::string& username, const std::string& password,
|
||||||
const std::string& metaverseUrl = "https://mv.overte.org");
|
const std::string& metaverseUrl = "https://mv.overte.org");
|
||||||
bool isAuthenticated() const;
|
bool isAuthenticated() const;
|
||||||
|
void setAuth(OverteAuth* auth); // Set metaverse authentication
|
||||||
|
|
||||||
// High-level connect that brings up key mixers.
|
// High-level connect that brings up key mixers.
|
||||||
bool connect();
|
bool connect();
|
||||||
@@ -131,8 +132,8 @@ private:
|
|||||||
std::uint32_t m_sequenceNumber{0}; // Packet sequence number for NLPacket protocol
|
std::uint32_t m_sequenceNumber{0}; // Packet sequence number for NLPacket protocol
|
||||||
std::uint16_t m_localID{0}; // Local ID assigned by domain server
|
std::uint16_t m_localID{0}; // Local ID assigned by domain server
|
||||||
|
|
||||||
// Authentication
|
// Authentication (non-owning pointer to auth object from main)
|
||||||
std::unique_ptr<OverteAuth> m_auth;
|
OverteAuth* m_auth{nullptr};
|
||||||
|
|
||||||
// Very small in-process world state for testing
|
// Very small in-process world state for testing
|
||||||
std::unordered_map<std::uint64_t, OverteEntity> m_entities;
|
std::unordered_map<std::uint64_t, OverteEntity> m_entities;
|
||||||
|
|||||||
Reference in New Issue
Block a user