2026-07-24 17:35:34 -03:00
|
|
|
using SeaHaven.Services.DTOs;
|
|
|
|
|
|
|
|
|
|
namespace SeaHaven.Services.Interfaces
|
|
|
|
|
{
|
|
|
|
|
public interface IAuthenticationService
|
|
|
|
|
{
|
|
|
|
|
Task<LoginResultDTO?> LoginAsync(string? username, string? password, CancellationToken cancellationToken);
|
2026-09-25 11:49:10 -03:00
|
|
|
/// <summary>Builds the same signed session payload that a successful login returns.</summary>
|
|
|
|
|
Task<LoginResultDTO> CreateSessionAsync(Data.SeaHavenIndustries.ApplicationUser user, CancellationToken cancellationToken);
|
2026-09-25 11:04:33 -03:00
|
|
|
Task<ChangePasswordResultDTO> ChangePasswordAsync(string userId, string? currentPassword, string? newPassword, CancellationToken cancellationToken);
|
2026-07-24 17:35:34 -03:00
|
|
|
Task<UserProfileDTO?> UpdateProfileAsync(string userId, UpdateProfileRequestDTO dto, CancellationToken cancellationToken);
|
2026-09-25 12:21:29 -03:00
|
|
|
/// <summary>
|
|
|
|
|
/// Emails a reset code when the address belongs to an active account. Gives no
|
|
|
|
|
/// indication either way, so callers cannot learn which emails are registered.
|
|
|
|
|
/// </summary>
|
|
|
|
|
Task ForgetPasswordAsync(string? email, CancellationToken cancellationToken);
|
|
|
|
|
/// <summary>Checks a code against the one issued to this email only.</summary>
|
|
|
|
|
Task<bool> VerifyCodeAsync(string? email, string? code, CancellationToken cancellationToken);
|
|
|
|
|
Task<bool> ResetPasswordAsync(string? email, string? code, string? password, CancellationToken cancellationToken);
|
2026-07-24 17:35:34 -03:00
|
|
|
}
|
|
|
|
|
}
|