Files
SocialPub/PrivaPub/Services/IRootUsersService.cs
T

50 lines
2.3 KiB
C#
Raw Permalink Normal View History

#pragma warning disable 8625
2023-02-18 08:52:17 +01:00
2023-02-19 00:43:43 +01:00
using PrivaPub.ClientModels;
using PrivaPub.ClientModels.User;
2023-02-18 08:52:17 +01:00
2023-02-19 00:43:43 +01:00
namespace PrivaPub.Services
2023-02-18 08:52:17 +01:00
{
public interface IRootUsersService
{
Task<WebResult> LoginAsync(LoginForm loginForm, CancellationToken token = default);
2023-02-18 08:52:17 +01:00
Task<WebResult> SignUpAsync(LoginForm signUpForm, CancellationToken token = default);
2023-02-18 08:52:17 +01:00
Task<WebResult> BanUserAsync(UsersIds usersIds, CancellationToken token = default);
2023-02-18 08:52:17 +01:00
Task<WebResult> UnbanUserAsync(UsersIds usersIds, CancellationToken token = default);
2023-02-18 08:52:17 +01:00
Task<WebResult> RemoveUserAsync(UsersIds usersIds, CancellationToken token = default);
Task<WebResult> RemoveSelfAsync(string rootId, string password, CancellationToken token = default);
2023-02-18 08:52:17 +01:00
/// <summary>Whether a login's password is this one, after the same hashing whatever the answer.</summary>
Task<bool> PasswordMatches(string rootId, string password, CancellationToken token = default);
Task<WebResult> UpdateUserPasswordAsync(UserPasswordForm userPasswordForm, string userId, CancellationToken token = default);
2023-02-18 08:52:17 +01:00
Task<WebResult> GetUserSettingsAsync(string userId, LoginForm loginForm = default, CancellationToken token = default);
2023-02-18 08:52:17 +01:00
Task<WebResult> UpdateUserSettingsAsync(ViewUserSettings userSettings, string userId, CancellationToken token = default);
2023-02-18 08:52:17 +01:00
Task<WebResult> SetupAndSendRecoveryEmail(PasswordRecoveryForm passwordRecoveryForm, string host, CancellationToken token = default);
2023-02-18 08:52:17 +01:00
Task<WebResult> IsValidRecoveryCode(string recoveryCode, CancellationToken token = default);
2023-02-18 08:52:17 +01:00
Task<WebResult> ChangePassword(NewPasswordForm newPasswordForm, CancellationToken token = default);
Task<WebResult> AccountAsync(string rootId, CancellationToken token = default);
Task<WebResult> RequestEmailChangeAsync(string rootId, EmailChangeForm form, CancellationToken token = default);
Task<WebResult> VerifyEmailAsync(string rootId, string code, CancellationToken token = default);
Task<WebResult> RemoveEmailAsync(string rootId, string password, CancellationToken token = default);
Task<WebResult> TotpSetupAsync(string rootId, string password, CancellationToken token = default);
Task<WebResult> TotpEnableAsync(string rootId, string code, CancellationToken token = default);
Task<WebResult> TotpDisableAsync(string rootId, string password, string code, CancellationToken token = default);
2023-02-18 08:52:17 +01:00
}
}