mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 03:43:11 +00:00
21 lines
1.4 KiB
C#
21 lines
1.4 KiB
C#
using SeaHaven.Services.DTOs;
|
|
|
|
namespace SeaHaven.Services.Interfaces
|
|
{
|
|
public interface IAuthenticationService
|
|
{
|
|
Task<LoginResultDTO?> LoginAsync(string? username, string? password, CancellationToken cancellationToken);
|
|
/// <summary>Builds the same signed session payload that a successful login returns.</summary>
|
|
Task<LoginResultDTO> CreateSessionAsync(Data.SeaHavenIndustries.ApplicationUser user, CancellationToken cancellationToken);
|
|
Task<ChangePasswordResultDTO> ChangePasswordAsync(string userId, string? currentPassword, string? newPassword, CancellationToken cancellationToken);
|
|
Task<UserProfileDTO?> UpdateProfileAsync(string userId, UpdateProfileRequestDTO dto, CancellationToken cancellationToken);
|
|
/// <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);
|
|
}
|
|
}
|