eeb6174de0
- ASP.NET Core 10 Backend (JWT Auth, Agent config API) - Vue 3 Frontend (Dashboard, Team, Agents, Config Editor) - PostgreSQL Database - Docker Compose setup - Mission Control Dashboard redesign
43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Nexus.Api.Contracts;
|
|
|
|
public sealed record LoginRequest
|
|
{
|
|
[Required, EmailAddress, MaxLength(120)]
|
|
public string Email { get; init; } = string.Empty;
|
|
|
|
[Required, MinLength(10), MaxLength(200)]
|
|
public string Password { get; init; } = string.Empty;
|
|
}
|
|
|
|
public sealed record AuthResponse
|
|
{
|
|
public string AccessToken { get; init; } = string.Empty;
|
|
public DateTimeOffset ExpiresAt { get; init; }
|
|
public UserInfo User { get; init; } = new();
|
|
}
|
|
|
|
public sealed record UserInfo
|
|
{
|
|
public Guid Id { get; init; }
|
|
public string Email { get; init; } = string.Empty;
|
|
public string DisplayName { get; init; } = string.Empty;
|
|
public string Role { get; init; } = string.Empty;
|
|
}
|
|
|
|
public sealed record UpdateProfileRequest
|
|
{
|
|
[MaxLength(100)]
|
|
public string? DisplayName { get; init; }
|
|
}
|
|
|
|
public sealed record ChangePasswordRequest
|
|
{
|
|
[Required, MinLength(10), MaxLength(200)]
|
|
public string CurrentPassword { get; init; } = string.Empty;
|
|
|
|
[Required, MinLength(10), MaxLength(200)]
|
|
public string NewPassword { get; init; } = string.Empty;
|
|
}
|