JWT-Authentifizierung & GameState-Verbesserungen

Neuer AuthController mit Endpunkten für Registrierung, Login und Nutzerinfo (/register, /login, /me) implementiert. Auth-spezifische DTOs hinzugefügt. GameHub mit [Authorize] geschützt und Spielteilnahme validiert. GameService liefert jetzt Rundeninfos, aktuelle Rundennummer und verbleibende Rundendauer. Migrations-Ordner im Projekt angelegt.
This commit is contained in:
Tim Krampitz
2026-07-26 13:30:03 +02:00
parent d29bff17a1
commit 070727d5cd
5 changed files with 190 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
namespace SlipItIn.Shared.DTOs;
public class RegisterRequestDto
{
public string Username { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
}
public class LoginRequestDto
{
public string Email { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
}
public class AuthResponseDto
{
public string Token { get; set; } = string.Empty;
public DateTime ExpiresAtUtc { get; set; }
public int UserId { get; set; }
public string Username { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
}