-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathIUserManager.cs
More file actions
23 lines (22 loc) · 1.16 KB
/
IUserManager.cs
File metadata and controls
23 lines (22 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System.Collections.Generic;
using System.Threading.Tasks;
using HwProj.Models.AuthService.ViewModels;
using Microsoft.AspNetCore.Identity;
namespace HwProj.AuthService.API.Services
{
public interface IUserManager
{
Task<IdentityResult> CreateAsync(UserViewModel userViewModel);
Task<IdentityResult> CreateAsync(UserViewModel userViewModel, string password);
Task<UserViewModel> FindByIdAsync(string id);
Task<UserViewModel> FindByEmailAsync(string email);
Task<IdentityResult> UpdateAsync(UserViewModel userViewModel);
Task<IdentityResult> AddToRoleAsync(UserViewModel userViewModel, string role);
Task<IdentityResult> RemoveFromRoleAsync(UserViewModel userViewModel, string role);
Task<IList<string>> GetRolesAsync(UserViewModel userViewModel);
Task<bool> IsEmailConfirmedAsync(UserViewModel userViewModel);
Task<bool> CheckPasswordAsync(UserViewModel userViewModel, string password);
Task<IdentityResult> ChangePasswordAsync(UserViewModel userViewModel, string currentPassword, string newPassword);
Task<IList<UserViewModel>> GetUsersInRoleAsync(string role);
}
}