2015-12-09 04:57:38 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading.Tasks;
|
2016-05-20 01:10:24 +02:00
|
|
|
|
using Microsoft.AspNetCore.Identity;
|
2015-12-09 04:57:38 +01:00
|
|
|
|
using Bit.Core.Domains;
|
|
|
|
|
|
|
|
|
|
namespace Bit.Core.Services
|
|
|
|
|
{
|
|
|
|
|
public interface IUserService
|
|
|
|
|
{
|
2016-05-21 23:16:22 +02:00
|
|
|
|
Task<User> GetUserByIdAsync(Guid userId);
|
2015-12-09 04:57:38 +01:00
|
|
|
|
Task SaveUserAsync(User user);
|
2016-02-21 05:25:44 +01:00
|
|
|
|
Task<IdentityResult> RegisterUserAsync(User user, string masterPassword);
|
2015-12-09 04:57:38 +01:00
|
|
|
|
Task SendMasterPasswordHintAsync(string email);
|
|
|
|
|
Task InitiateEmailChangeAsync(User user, string newEmail);
|
2016-05-21 23:16:22 +02:00
|
|
|
|
Task<IdentityResult> ChangeEmailAsync(User user, string masterPassword, string newEmail, string newMasterPassword, string token, IEnumerable<Cipher> ciphers);
|
|
|
|
|
Task<IdentityResult> ChangePasswordAsync(User user, string currentMasterPasswordHash, string newMasterPasswordHash, IEnumerable<Cipher> ciphers);
|
2015-12-09 04:57:38 +01:00
|
|
|
|
Task<IdentityResult> RefreshSecurityStampAsync(User user, string masterPasswordHash);
|
|
|
|
|
Task GetTwoFactorAsync(User user, Enums.TwoFactorProvider provider);
|
2015-12-27 06:14:56 +01:00
|
|
|
|
Task<IdentityResult> DeleteAsync(User user);
|
2015-12-09 04:57:38 +01:00
|
|
|
|
}
|
|
|
|
|
}
|