2022-09-10 00:33:17 +03:00
|
|
|
using System.Threading.Tasks;
|
|
|
|
using Microsoft.AspNetCore.Identity;
|
|
|
|
|
|
|
|
namespace BlueWest.WebApi.Context.Users;
|
|
|
|
|
2022-09-10 07:12:03 +03:00
|
|
|
/// <summary>
|
|
|
|
/// Auth manager contract interface.
|
|
|
|
/// </summary>
|
2022-09-10 00:33:17 +03:00
|
|
|
public interface IAuthManager
|
|
|
|
{
|
2022-09-10 07:12:03 +03:00
|
|
|
/// <summary>
|
|
|
|
/// CreateUserAsync
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="registerViewModel"></param>
|
|
|
|
/// <returns></returns>
|
2022-09-10 00:33:17 +03:00
|
|
|
Task<IdentityResult> CreateUserAsync(RegisterViewModel registerViewModel);
|
|
|
|
|
2022-09-10 07:12:03 +03:00
|
|
|
/// <summary>
|
|
|
|
/// VerifyLoginAsync
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="email"></param>
|
|
|
|
/// <param name="password"></param>
|
|
|
|
/// <returns></returns>
|
2022-09-10 00:33:17 +03:00
|
|
|
Task<bool> VerifyLoginAsync(string email, string password);
|
|
|
|
|
2022-09-10 07:12:03 +03:00
|
|
|
/// <summary>
|
|
|
|
/// GetToken
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="loginViewModel"></param>
|
|
|
|
/// <returns></returns>
|
2022-09-10 00:33:17 +03:00
|
|
|
Task<AccessToken> GetToken(LoginViewModel loginViewModel);
|
|
|
|
|
|
|
|
}
|