Add Login model with username, password, and domain fields

Introduced a Login class in the FakeNTLMServer.Model namespace to represent user credentials. The model includes required Username and Password properties, supporting various username formats, and an optional Domain property that defaults to the local machine if not specified.
This commit is contained in:
2026-03-13 10:31:12 +01:00
parent 8a8006874d
commit d8c87f25d8

23
Model/Login.cs Normal file
View File

@@ -0,0 +1,23 @@
using System.ComponentModel.DataAnnotations;
namespace FakeNTLMServer.Model;
public class Login
{
/// <summary>
/// Username. Supports formats: "username", "DOMAIN\username", "username@domain"
/// </summary>
[Required]
public string Username { get; set; } = default!;
/// <summary>
/// Password
/// </summary>
[Required]
public string Password { get; set; } = default!;
/// <summary>
/// Domain (optional). Defaults to local machine ("."). Ignored if domain is included in Username.
/// </summary>
public string? Domain { get; set; }
}