using PlotLine.ViewModels; namespace PlotLine.Services; public interface IAuthService { Task RegisterAsync(RegisterViewModel model); Task LoginAsync(LoginViewModel model); Task CompleteTwoFactorLoginAsync(TwoFactorViewModel model); Task LogoutAsync(); Task VerifyEmailAsync(Guid token); Task ForgotPasswordAsync(ForgotPasswordViewModel model); Task ResetPasswordAsync(ResetPasswordViewModel model); Task ChangePasswordAsync(ChangePasswordViewModel model); Task EnableTwoFactorAsync(int userId); Task DisableTwoFactorAsync(int userId); Task> GenerateRecoveryCodesAsync(int userId); } public interface IPasswordService { string HashPassword(string password); bool VerifyPassword(string password, string passwordHash); } public interface ITwoFactorService { string GenerateSecretKey(); string GenerateQrCodeUri(string email, string secretKey); bool ValidateCode(string secretKey, string code); IReadOnlyList GenerateRecoveryCodes(int count); } public interface IEmailService { Task SendVerificationEmailAsync(string email, string displayName, Guid token); Task SendPasswordResetEmailAsync(string email, string displayName, Guid token); } public interface ICurrentUserService { int? UserId { get; } string? Email { get; } string? DisplayName { get; } bool IsAuthenticated { get; } }