20#ifndef ORES_IAM_SERVICE_SIGNUP_SERVICE_HPP
21#define ORES_IAM_SERVICE_SIGNUP_SERVICE_HPP
26#include <boost/uuid/uuid.hpp>
27#include "ores.comms/messaging/message_types.hpp"
28#include "ores.iam/domain/account.hpp"
29#include "ores.iam/repository/account_repository.hpp"
30#include "ores.iam/repository/login_info_repository.hpp"
31#include "ores.iam/service/authorization_service.hpp"
32#include "ores.variability/service/system_flags_service.hpp"
33#include "ores.utility/uuid/uuid_v7_generator.hpp"
34#include "ores.logging/make_logger.hpp"
43 std::string error_message;
44 ores::utility::serialization::error_code error_code = ores::utility::serialization::error_code::none;
45 boost::uuids::uuid account_id;
64 inline static std::string_view logger_name =
65 "ores.iam.service.signup_service";
67 [[nodiscard]]
static auto& lg() {
69 static auto instance = make_logger(logger_name);
84 std::shared_ptr<variability::service::system_flags_service> system_flags,
85 std::shared_ptr<authorization_service> auth_service);
104 const std::string& email,
const std::string& password);
116 std::shared_ptr<variability::service::system_flags_service> system_flags_;
117 std::shared_ptr<authorization_service> auth_service_;
Service layer for the IAM module.
Definition account_service.hpp:34
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Context for the operations on a postgres database.
Definition context.hpp:30
Reads and writes accounts off of data storage.
Definition account_repository.hpp:36
Reads and writes login tracking information off of data storage.
Definition login_info_repository.hpp:36
Result of a signup operation.
Definition signup_service.hpp:41
Service for user self-registration (signup).
Definition signup_service.hpp:62
signup_result register_user(const std::string &username, const std::string &email, const std::string &password)
Registers a new user account.
Definition signup_service.cpp:43
bool is_signup_enabled() const
Checks if signups are currently enabled.
Definition signup_service.cpp:177
A generator for UUID version 7 (v7) based on RFC 9562.
Definition uuid_v7_generator.hpp:50