feat(api): аутентификация и авторизация. Кастомные ParrAuthenticationHandler и BaseSimpleRoleProvider.
This commit is contained in:
22
PARR.API/Services/Interfaces/IAuthService.cs
Normal file
22
PARR.API/Services/Interfaces/IAuthService.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using PARR.API.Authentication.Models;
|
||||
|
||||
namespace PARR.API.Services.Interfaces
|
||||
{
|
||||
public interface IAuthService
|
||||
{
|
||||
/// <summary>
|
||||
/// Получить пользователя с ролями по ip адресу.
|
||||
/// Смотрим в кэше, затем в БД. При необходимости блокирует или добавлет в кэш.
|
||||
/// </summary>
|
||||
/// <param name="ipAddress"></param>
|
||||
/// <returns></returns>
|
||||
Task<UserCache?> GetUserAsync(string ipAddress);
|
||||
|
||||
/// <summary>
|
||||
/// Проверяет, блокировку пользователя
|
||||
/// </summary>
|
||||
/// <param name="ipAddress"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> UserIsBlockedAsync(string ipAddress);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user