Add self-service profile and account deletion APIs

This commit is contained in:
hz
2026-07-19 13:39:24 -05:00
parent 942cd59db8
commit 18c3d6fc5d
7 changed files with 147 additions and 3 deletions
+3
View File
@@ -4,3 +4,6 @@ public class RegisterRequest { public string Username { get; set; } = ""; public
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; } = ""; }
public class UpdateProfileRequest { public string? DisplayName { get; set; } public string? Email { get; set; } }
public class ChangePasswordRequest { public string CurrentPassword { get; set; } = ""; public string NewPassword { get; set; } = ""; }
public class DeleteAccountRequest { public string Password { get; set; } = ""; public string Confirmation { get; set; } = ""; }
+2
View File
@@ -11,6 +11,8 @@ public class User
public string PasswordHash { get; set; } = default!;
public string Role { get; set; } = "USER";
public string? Email { get; set; }
public string? DisplayName { get; set; }
public DateTime? CreatedUtc { get; set; }
public string? RefreshToken { get; set; }
public DateTime? RefreshTokenExpiry { get; set; }
}