AuthorBuddy/Services/IAuthService.cs
2026-05-21 11:04:42 +02:00

21 lines
714 B
C#

using AuthorBuddy.Web.Data;
namespace AuthorBuddy.Web.Services;
public interface IAuthService
{
Task<bool> LoginAsync(string username, string password);
Task LogoutAsync();
Task<bool> RegisterAsync(string username, string password);
Task AdminBypassLoginAsync(int userId);
Task<UserEntity?> GetCurrentUserAsync();
bool IsLoggedIn { get; }
bool Is2FARequired { get; }
Task<bool> Verify2FAAsync(string code);
Task<string> Generate2FASecretAsync();
string Get2FAProvisioningUri(string secret, string username);
Task<bool> Enable2FAAsync(string secret);
Task<bool> Disable2FAAsync();
Task<bool> Is2FAEnabledAsync();
Task<string?> GetCurrent2FASecretAsync();
}