Fase 2: Creatción de la UI (React + Vite). Implementación de Log In reemplazando texto plano. Y creación de tool para migrar contraseñas.
This commit is contained in:
15
Backend/GestionIntegral.Api/Models/Dtos/LoginRequestDto.cs
Normal file
15
Backend/GestionIntegral.Api/Models/Dtos/LoginRequestDto.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations; // Para validaciones básicas
|
||||
|
||||
namespace GestionIntegral.Api.Dtos
|
||||
{
|
||||
public class LoginRequestDto
|
||||
{
|
||||
[Required]
|
||||
[StringLength(20)]
|
||||
public string Username { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[StringLength(50, MinimumLength = 6)] // Ajustar el mínimo
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
13
Backend/GestionIntegral.Api/Models/Dtos/LoginResponseDto.cs
Normal file
13
Backend/GestionIntegral.Api/Models/Dtos/LoginResponseDto.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace GestionIntegral.Api.Dtos
|
||||
{
|
||||
public class LoginResponseDto
|
||||
{
|
||||
public string Token { get; set; } = string.Empty; // El token JWT
|
||||
public int UserId { get; set; }
|
||||
public string Username { get; set; } = string.Empty;
|
||||
public string NombreCompleto { get; set; } = string.Empty;
|
||||
public bool EsSuperAdmin { get; set; }
|
||||
public bool DebeCambiarClave { get; set; } // Para el primer login
|
||||
// Se puede añadir más info si se necesita inmediatamente en el frontend (ej: IdPerfil)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user