|
ORE Studio 0.0.4
|
Service for user self-registration (signup). More...
#include <signup_service.hpp>

Public Types | |
| using | context = ores::database::context |
Public Member Functions | |
| signup_service (database::context ctx, std::shared_ptr< variability::service::system_flags_service > system_flags, std::shared_ptr< authorization_service > auth_service) | |
| Constructs a signup_service. | |
| signup_result | register_user (const std::string &username, const std::string &email, const std::string &password) |
| Registers a new user account. | |
| bool | is_signup_enabled () const |
| Checks if signups are currently enabled. | |
Service for user self-registration (signup).
This service handles the signup workflow, allowing users to create their own accounts when self-registration is enabled via the system.user_signups feature flag.
The service validates:
| signup_service | ( | database::context | ctx, |
| std::shared_ptr< variability::service::system_flags_service > | system_flags, | ||
| std::shared_ptr< authorization_service > | auth_service | ||
| ) |
Constructs a signup_service.
| ctx | The database context for repository access. |
| system_flags | Shared system flags service for flag access. |
| auth_service | Shared authorization service for role assignment. |
| signup_result register_user | ( | const std::string & | username, |
| const std::string & | email, | ||
| const std::string & | password | ||
| ) |
Registers a new user account.
This method performs the full signup workflow:
| username | The desired username (must be unique) |
| The user's email address (must be unique and valid format) | |
| password | The password (must meet policy requirements) |
| bool is_signup_enabled | ( | ) | const |
Checks if signups are currently enabled.