Start implementing UserService
- add UserController - add getUsers method with pagination - handle auth errors using enum
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "dependency_injection/DependencyContainer.h"
|
||||
#include "models/User.h"
|
||||
#include "services/encryption/PasswordEncryptor.h"
|
||||
#include "services/enums/AuthErrorCode.h"
|
||||
|
||||
std::string PUBLIC_KEY{
|
||||
R"(-----BEGIN PUBLIC KEY-----
|
||||
@@ -48,9 +49,9 @@ bool UserManager::validateCredentials(const User& userData, std::string&& rawPas
|
||||
return hashedPassword == userData.passwordHash;
|
||||
}
|
||||
|
||||
bool UserManager::validateRegisterData(const RegisterRequestDto& registerData)
|
||||
AuthErrorCode UserManager::validateRegisterData(const RegisterRequestDto& registerData)
|
||||
{
|
||||
return true;
|
||||
return AuthErrorCode::Ok;
|
||||
}
|
||||
|
||||
std::string UserManager::generateToken(const User& userData)
|
||||
|
||||
Reference in New Issue
Block a user