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

39 lines
1.1 KiB
C#
Raw Normal View History

2022-09-26 04:40:18 +03:00
using System;
using System.Security.Claims;
using System.Threading.Tasks;
using BlueWest.Data.Application;
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
/// <summary>
/// Auth manager contract interface.
/// </summary>
public interface IAuthManager
{
/// <summary>
/// CreateUserAsync
/// </summary>
2022-10-27 20:13:02 +03:00
/// <param name="registerRequest"></param>
2022-09-26 04:40:18 +03:00
/// <returns></returns>
2022-10-27 20:13:02 +03:00
Task<IdentityResult> CreateUserAsync(RegisterRequest registerRequest);
2022-09-26 04:40:18 +03:00
/// <summary>
/// Does Login
/// </summary>
/// <param name="loginRequest"></param>
/// <returns></returns>
2022-10-27 20:13:02 +03:00
public Task<(bool, SessionTokenUnique, ClaimsIdentity)> GetSessionTokenIdByLoginRequest(LoginRequest loginRequest, string authenticationType);
/// <summary>
/// Does Login
/// </summary>
/// <param name="loginRequest"></param>
/// <returns></returns>
public Task<(bool, SessionTokenUnique, ClaimsIdentity)> GetSessionTokenIdByLoginRequestViaCookie(LoginRequest loginRequest, string authenticationType);
2022-09-26 04:40:18 +03:00
}