:drunk: Write shit code trying to split up the Auth (WIP)
This commit is contained in:
@ -0,0 +1,46 @@
|
||||
using System.Globalization;
|
||||
using NodaTime;
|
||||
using DysonNetwork.Pass.Features.Auth;
|
||||
using DysonNetwork.Pass.Features.Auth.OpenId;
|
||||
using DysonNetwork.Common.Models;
|
||||
|
||||
namespace DysonNetwork.Pass.Features.Account.Interfaces;
|
||||
|
||||
public interface IAccountService
|
||||
{
|
||||
static void SetCultureInfo(Models.Account account) { }
|
||||
static void SetCultureInfo(string? languageCode) { }
|
||||
Task PurgeAccountCache(Models.Account account);
|
||||
Task<Models.Account?> LookupAccount(string probe);
|
||||
Task<Models.Account?> LookupAccountByConnection(string identifier, string provider);
|
||||
Task<int?> GetAccountLevel(Guid accountId);
|
||||
Task<Models.Account> CreateAccount(
|
||||
string name,
|
||||
string nick,
|
||||
string email,
|
||||
string? password,
|
||||
string language = "en-US",
|
||||
bool isEmailVerified = false,
|
||||
bool isActivated = false
|
||||
);
|
||||
Task<Models.Account> CreateAccount(OidcUserInfo userInfo);
|
||||
Task RequestAccountDeletion(Models.Account account);
|
||||
Task RequestPasswordReset(Models.Account account);
|
||||
Task<bool> CheckAuthFactorExists(Models.Account account, AccountAuthFactorType type);
|
||||
Task<AccountAuthFactor?> CreateAuthFactor(Models.Account account, AccountAuthFactorType type, string? secret);
|
||||
Task<AccountAuthFactor> EnableAuthFactor(AccountAuthFactor factor, string? code);
|
||||
Task<AccountAuthFactor> DisableAuthFactor(AccountAuthFactor factor);
|
||||
Task DeleteAuthFactor(AccountAuthFactor factor);
|
||||
Task SendFactorCode(Models.Account account, AccountAuthFactor factor, string? hint = null);
|
||||
Task<bool> VerifyFactorCode(AccountAuthFactor factor, string code);
|
||||
Task<Session> UpdateSessionLabel(Models.Account account, Guid sessionId, string label);
|
||||
Task DeleteSession(Models.Account account, Guid sessionId);
|
||||
Task<AccountContact> CreateContactMethod(Models.Account account, AccountContactType type, string content);
|
||||
Task VerifyContactMethod(Models.Account account, AccountContact contact);
|
||||
Task<AccountContact> SetContactMethodPrimary(Models.Account account, AccountContact contact);
|
||||
Task DeleteContactMethod(Models.Account account, AccountContact contact);
|
||||
Task<Badge> GrantBadge(Models.Account account, Badge badge);
|
||||
Task RevokeBadge(Models.Account account, Guid badgeId);
|
||||
Task ActiveBadge(Models.Account account, Guid badgeId);
|
||||
Task EnsureAccountProfileCreated();
|
||||
}
|
Reference in New Issue
Block a user