54 lines
1.3 KiB
C#
54 lines
1.3 KiB
C#
namespace Heimdall.Application.DTOs;
|
|
|
|
public record RegisterRequest(string Email, string Password, string DisplayName);
|
|
|
|
public record LoginRequest(string Email, string Password);
|
|
|
|
public record Verify2faRequest(string ChallengeId, string Code);
|
|
|
|
public record RefreshTokenRequest(string RefreshToken);
|
|
|
|
public record AuthResponse(
|
|
string AccessToken,
|
|
string RefreshToken,
|
|
DateTime ExpiresAt,
|
|
bool Requires2fa,
|
|
UserInfo User,
|
|
string? ChallengeId = null);
|
|
|
|
public record UserInfo(
|
|
Guid Id,
|
|
string Email,
|
|
string DisplayName,
|
|
IList<string> Roles);
|
|
|
|
public record ApiKeyResponse(
|
|
Guid Id,
|
|
string KeyPrefix,
|
|
Guid? SiteId,
|
|
DateTime CreatedAt,
|
|
DateTime? ExpiresAt,
|
|
bool Enabled,
|
|
DateTime? LastUsedAt);
|
|
|
|
public record CreateApiKeyResponse(
|
|
Guid Id,
|
|
string KeyPrefix,
|
|
string FullKey,
|
|
DateTime? ExpiresAt);
|
|
|
|
public record ChangePasswordRequest(string CurrentPassword, string NewPassword);
|
|
|
|
public record LogoutRequest(string RefreshToken);
|
|
|
|
|
|
public record Enable2faResponse(
|
|
string SharedKey,
|
|
string QrCodeUri,
|
|
IReadOnlyList<string>? RecoveryCodes = null,
|
|
int RecoveryCodesRemaining = 0);
|
|
|
|
public record ConfirmEmailRequest(string UserId, string Token);
|
|
public record ForgotPasswordRequest(string Email);
|
|
public record ResetPasswordRequest(string Email, string Token, string NewPassword);
|