43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
|
|
using System.Security.Claims;
|
|
using CodeLiturgy.Data.Application.Users;
|
|
using Microsoft.AspNetCore.Identity;
|
|
|
|
namespace CodeLiturgy.Data.Auth.Context.Users
|
|
{
|
|
public interface IUserManager
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="principal"></param>
|
|
/// <returns></returns>
|
|
Task<ApplicationUser> GetUserAsync(ClaimsPrincipal principal);
|
|
/// <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);
|
|
|
|
string GetUserId(ClaimsPrincipal principal);
|
|
|
|
}
|
|
}
|
|
|