Files
HousingManagement-server/src/services/AuthService.h
olshab 6df4896628 Add token validation filter based on token signature and expiration date
- changed login request from GET to POST
- implement json body conversion to DTO objects
- set `user_id` and `role` attributes for HttpRequest inside filter
2025-06-14 16:35:18 +04:00

25 lines
511 B
C++

#pragma once
#include <memory>
#include <string>
#include <spdlog/logger.h>
class IUserStorage;
class UserManager;
class LoginRequestDto;
class RegisterRequestDto;
class AuthService
{
public:
AuthService();
bool authenticateUser(LoginRequestDto& loginData, std::string& outToken);
bool registerUser(RegisterRequestDto& registerData, std::string& outToken);
private:
std::shared_ptr<spdlog::logger> m_logger;
std::shared_ptr<IUserStorage> m_userStorage;
std::shared_ptr<UserManager> m_userManager;
};