mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 07:11:10 +00:00
Implements account registration
This commit is contained in:
1 parent
d971b53512
commit
bd97c2e8c1
13 files changed
+736
No files matched your search
@@ -0,0 +1,20 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.Authentication;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the request model for user registration.
|
||||
/// </summary>
|
||||
/// <param name="Username">The desired username for the new account.</param>
|
||||
/// <param name="Password">The password for the new account.</param>
|
||||
/// <param name="PasswordConfirm">The confirmation of the entered password, used to ensure consistency.</param>
|
||||
/// <param name="Use2fa">Indicates whether two-factor authentication (2FA) should be enabled for the new account.</param>
|
||||
[DebuggerDisplay("Username: {Username}")]
|
||||
public record RegistrationRequest(
|
||||
string? Username = null,
|
||||
string? Password = null,
|
||||
string? PasswordConfirm = null,
|
||||
bool Use2fa = true
|
||||
);
|
||||
@@ -0,0 +1,19 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.Authentication;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the response model for user registration.
|
||||
/// </summary>
|
||||
/// <param name="Id">The Id of the user.</param>
|
||||
/// <param name="Username">The username of the user.</param>
|
||||
/// <param name="TotpSecret">The TOTP (Time-Based One-Time Password) secret used for two-factor authentication.</param>
|
||||
[DebuggerDisplay("Username: {Username}")]
|
||||
public record RegistrationResponse(
|
||||
Guid Id,
|
||||
string Username,
|
||||
string? TotpSecret
|
||||
);
|
||||
Reference in new issue
Block a user