generated from Sithas/conan_template
DAO - Полное завершение класса
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <mysqlx/xdevapi.h>
|
||||
|
||||
#include "IAuthDAO.h"
|
||||
|
||||
namespace uad
|
||||
{
|
||||
class MemoryAuthDAO : public uad::IAuthDAO
|
||||
{
|
||||
std::unordered_map<std::string, std::string> users_uuids_to_auth_tokens_;
|
||||
std::unordered_map<std::string, std::string> auth_tokens_to_users_uuids_;
|
||||
|
||||
mysqlx::Session& session_;
|
||||
public:
|
||||
explicit MemoryAuthDAO(mysqlx::Session& session);
|
||||
|
||||
std::string Login(const std::string& registrated_user_uuid) override;
|
||||
|
||||
bool HasAuthorizedUser(const std::string& auth_token) override;
|
||||
|
||||
bool Logout(const std::string& auth_token) override;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user