Add versioned legal consent to authentication
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
namespace AuthApi.Models;
|
||||
|
||||
public class RegisterRequest { public string Username { get; set; } = ""; public string Password { get; set; } = ""; public string? Email { get; set; } }
|
||||
public class RegisterRequest { public string Username { get; set; } = ""; public string Password { get; set; } = ""; public string? Email { get; set; } public bool AcceptLegal { get; set; } }
|
||||
public class LoginRequest { public string Username { get; set; } = ""; public string Password { get; set; } = ""; }
|
||||
public class ChangeRoleRequest { public string Username { get; set; } = ""; public string NewRole { get; set; } = ""; }
|
||||
public class RefreshRequest { public string Username { get; set; } = ""; public string RefreshToken { get; set; } = ""; }
|
||||
@@ -14,4 +14,6 @@ public class CompleteSteamRequest
|
||||
public string Username { get; set; } = "";
|
||||
public string? Email { get; set; }
|
||||
public string Password { get; set; } = "";
|
||||
public bool AcceptLegal { get; set; }
|
||||
}
|
||||
public class AcceptLegalRequest { public bool Accept { get; set; } }
|
||||
|
||||
@@ -16,4 +16,16 @@ public class User
|
||||
public string? RefreshToken { get; set; }
|
||||
public DateTime? RefreshTokenExpiry { get; set; }
|
||||
public string? SteamId { get; set; }
|
||||
public string? TermsAcceptedVersion { get; set; }
|
||||
public string? PrivacyAcceptedVersion { get; set; }
|
||||
public DateTime? LegalAcceptedUtc { get; set; }
|
||||
public List<LegalAcceptanceRecord> LegalAcceptances { get; set; } = [];
|
||||
}
|
||||
|
||||
public sealed class LegalAcceptanceRecord
|
||||
{
|
||||
public string TermsVersion { get; set; } = "";
|
||||
public string PrivacyVersion { get; set; } = "";
|
||||
public DateTime AcceptedUtc { get; set; } = DateTime.UtcNow;
|
||||
public string Source { get; set; } = "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user