18 const std::string &password) {
20 LOG_WARNING(
"Authentication failed for user: ", username);
25 std::string token =
_authService->generateToken(username);
28 LOG_INFO(
"✓ User authenticated and session created: ", username);
38 std::shared_ptr<Session> session = std::make_shared<Session>(
id);
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.
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.