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.
24 lines
664 B
C#
24 lines
664 B
C#
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;
|
|
}
|