mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 13:11:10 +00:00
Implements authentication system
This commit is contained in:
1 parent
38829d64ff
commit
a6dcf65d1c
103 files changed
+2983
-454
No files matched your search
@@ -0,0 +1,15 @@
|
||||
namespace Lumina.Contracts.Requests.Authentication;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the request model for account password change.
|
||||
/// </summary>
|
||||
/// <param name="CurrentPassword">The username of the account.</param>
|
||||
/// <param name="CurrentPassword">The current password of the account.</param>
|
||||
/// <param name="NewPassword">The new password of the account.</param>
|
||||
/// <param name="NewPasswordConfirm">The confirmation of the new password of the account.</param>
|
||||
public record ChangePasswordRequest(
|
||||
string? Username,
|
||||
string? CurrentPassword,
|
||||
string? NewPassword,
|
||||
string? NewPasswordConfirm
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.Authentication;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the request model for account password recovery.
|
||||
/// </summary>
|
||||
/// <param name="Username">The username of the account for which to recover the password.</param>
|
||||
/// <param name="TotpCode">The TOTP (Time-Based One-Time Password) of the account for which to recover the password.</param>
|
||||
[DebuggerDisplay("Username: {Username}")]
|
||||
public record RecoverPasswordRequest(
|
||||
string? Username,
|
||||
string? TotpCode
|
||||
);
|
||||
@@ -0,0 +1,14 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.Authentication;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the response model for an account password change request.
|
||||
/// </summary>
|
||||
/// <param name="IsPasswordChanged">Whether the password was changed or not.</param>
|
||||
[DebuggerDisplay("IsPasswordChanged: {IsPasswordChanged}")]
|
||||
public record ChangePasswordResponse(
|
||||
bool IsPasswordChanged
|
||||
);
|
||||
@@ -0,0 +1,14 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.Authentication;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the response model for an account password reset request.
|
||||
/// </summary>
|
||||
/// <param name="IsPasswordReset">Whether the password was reset or not.</param>
|
||||
[DebuggerDisplay("IsPasswordReset: {IsPasswordReset}")]
|
||||
public record RecoverPasswordResponse(
|
||||
bool IsPasswordReset
|
||||
);
|
||||
@@ -0,0 +1,14 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.UsersManagement;
|
||||
|
||||
/// </summary>
|
||||
/// Represents a response for verifying the initialization status of the application.
|
||||
/// </summary>
|
||||
/// <param name="IsInitialized">Indicates whether the application has been run before, and the super admin account has been created.</param>
|
||||
[DebuggerDisplay("IsInitialized: {IsInitialized}")]
|
||||
public record InitializationResponse(
|
||||
bool IsInitialized
|
||||
);
|
||||
Reference in new issue
Block a user