43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using System;
|
|
using System.Security.Claims;
|
|
using System.Threading.Tasks;
|
|
using BlueWest.Data.Application;
|
|
using Microsoft.AspNetCore.Identity;
|
|
|
|
namespace BlueWest.WebApi.Context.Users;
|
|
|
|
/// <summary>
|
|
/// Auth manager contract interface.
|
|
/// </summary>
|
|
public interface IAuthManager
|
|
{
|
|
/// <summary>
|
|
/// CreateUserAsync
|
|
/// </summary>
|
|
/// <param name="registerViewModel"></param>
|
|
/// <returns></returns>
|
|
Task<IdentityResult> CreateUserAsync(RegisterViewModel registerViewModel);
|
|
|
|
/// <summary>
|
|
/// VerifyLoginAsync
|
|
/// </summary>
|
|
/// <param name="email"></param>
|
|
/// <param name="password"></param>
|
|
/// <returns></returns>
|
|
Task<bool> VerifyLoginByEmailAsync(string email, string password);
|
|
|
|
/// <summary>
|
|
/// GetToken
|
|
/// </summary>
|
|
/// <param name="loginRequest"></param>
|
|
/// <returns></returns>
|
|
Task<(bool, SessionTokenUnique, AccessToken)> GetToken(LoginRequest loginRequest);
|
|
|
|
/// <summary>
|
|
/// Does Login
|
|
/// </summary>
|
|
/// <param name="loginRequest"></param>
|
|
/// <returns></returns>
|
|
Task<(bool, ClaimsIdentity, SessionTokenUnique)> DoLogin(LoginRequest loginRequest);
|
|
|
|
} |