CodeLiturgy.Dashboard/BlueWest.Data.Auth/Users/IUserManager.cs

43 lines
1.1 KiB
C#
Raw Normal View History

2022-09-27 20:12:13 +03:00
2022-10-27 20:13:02 +03:00
using System.Security.Claims;
2022-09-27 20:12:13 +03:00
using BlueWest.Data.Application.Users;
2022-09-26 04:40:18 +03:00
using Microsoft.AspNetCore.Identity;
2022-09-27 20:12:13 +03:00
namespace BlueWest.Data.Auth.Context.Users
2022-09-26 04:40:18 +03:00
{
public interface IUserManager
{
2022-10-27 20:13:02 +03:00
/// <summary>
///
/// </summary>
/// <param name="principal"></param>
/// <returns></returns>
Task<ApplicationUser> GetUserAsync(ClaimsPrincipal principal);
2022-09-26 04:40:18 +03:00
/// <summary>
/// Create user.
/// </summary>
/// <param name="user"></param>
/// <returns></returns>
Task<IdentityResult> CreateAsync(ApplicationUser user);
/// <summary>
/// Checks for user password
/// </summary>
/// <param name="user"></param>
/// <param name="password"></param>
/// <returns></returns>
Task<bool> CheckPasswordAsync(ApplicationUser user, string password);
/// <summary>
/// Find by email
/// </summary>
/// <param name="email"></param>
/// <returns></returns>
Task<ApplicationUser> FindByEmailAsync(string email);
2022-10-27 20:13:02 +03:00
string GetUserId(ClaimsPrincipal principal);
2022-09-26 04:40:18 +03:00
}
}