generated from Sithas/conan_template
DAO - Полное завершение класса
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ class IAuthDAO
|
|||||||
public:
|
public:
|
||||||
virtual std::string Login(const std::string& registrated_user_uuid) = 0;
|
virtual std::string Login(const std::string& registrated_user_uuid) = 0;
|
||||||
|
|
||||||
virtual bool HasAuthorizedUser(const std::string& auth_token) = 0;
|
virtual bool HasAuthorized(const std::string& auth_token) = 0;
|
||||||
|
|
||||||
virtual bool Logout(const std::string& user_token) = 0;
|
virtual bool Logout(const std::string& user_token) = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ std::string MemoryAuthDAO::Login(const std::string& registrated_user_uuid)
|
|||||||
return auth_token;
|
return auth_token;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MemoryAuthDAO::HasAuthorizedUser(const std::string& user_uuid)
|
bool MemoryAuthDAO::HasAuthorized(const std::string& auth_token)
|
||||||
{
|
{
|
||||||
return users_uuids_to_auth_tokens_.count(user_uuid) > 0;
|
return auth_tokens_to_users_uuids_.count(auth_token) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MemoryAuthDAO::Logout(const std::string& auth_token)
|
bool MemoryAuthDAO::Logout(const std::string& auth_token)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public:
|
|||||||
|
|
||||||
std::string Login(const std::string& registrated_user_uuid) override;
|
std::string Login(const std::string& registrated_user_uuid) override;
|
||||||
|
|
||||||
bool HasAuthorizedUser(const std::string& auth_token) override;
|
bool HasAuthorized(const std::string& auth_token) override;
|
||||||
|
|
||||||
bool Logout(const std::string& auth_token) override;
|
bool Logout(const std::string& auth_token) override;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user