CodeLiturgy.Dashboard/BlueWest.Api/Users/Auth/IAuthManager.cs

34 lines
880 B
C#
Raw Normal View History

2022-09-10 00:33:17 +03:00
using System.Threading.Tasks;
using BlueWest.Data;
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);
}