11#include <unordered_map>
27 std::shared_ptr<Session>
createSession(
const std::string &
id)
override;
28 std::shared_ptr<Session>
getSession(
const std::string &
id)
override;
46 std::unordered_map<std::string, std::shared_ptr<Session>>
_sessions;
Manages active player sessions with authentication support.
std::shared_ptr< AuthService > _authService
std::shared_ptr< Session > createSession(const std::string &id) override
Create a new session.
std::string authenticateAndCreateSession(const std::string &username, const std::string &password)
Authenticate and create a session.
~SessionManager() override=default
std::unordered_map< std::string, std::shared_ptr< Session > > _sessions
std::shared_ptr< Session > getSession(const std::string &id) override
Get session by ID.
void removeSession(const std::string &id) override
Remove session by ID.
std::shared_ptr< AuthService > getAuthService()
Get the auth service.