Implements account login

This commit is contained in:
BinaryAlley committed 2024-11-11 15:19:50 +02:00
1 parent abc2777357
commit 38829d64ff
23 files changed
+826 -7

No files matched your search

@@ -0,0 +1,18 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Requests.Authentication;
/// <summary>
/// Represents the request model for user authentication.
/// </summary>
/// <param name="Username">The username of the account to authenticate.</param>
/// <param name="Password">The password of the account to authenticate.</param>
/// <param name="TotpCode">The TOTP (Time-Based One-Time Password) of the account to authenticate.</param>
[DebuggerDisplay("Username: {Username}")]
public record LoginRequest(
string? Username,
string? Password,
string? TotpCode = null
);
@@ -0,0 +1,21 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.Authentication;
/// <summary>
/// Represents the response model for user authentication.
/// </summary>
/// <param name="Id">The Id of the user to authenticate.</param>
/// <param name="Username">The username of the user to authenticate.</param>
/// <param name="Token">The authentication token used for subsequent requests.</param>
/// <param name="UsesTotp">Whether the user uses 2FA authentication, or not.</param>
[DebuggerDisplay("Username: {Username}")]
public record LoginResponse(
Guid Id,
string Username,
string Token,
bool UsesTotp
);