Files
Moonlight/Moonlight.Api/Infrastructure/Hooks/IUserAuthHook.cs

13 lines
448 B
C#

using System.Security.Claims;
using Moonlight.Api.Infrastructure.Database.Entities;
namespace Moonlight.Api.Infrastructure.Hooks;
public interface IUserAuthHook
{
public Task<bool> SyncAsync(ClaimsPrincipal principal, User trackedUser);
// Every implementation of this function should execute as fast as possible
// as this directly impacts every api call
public Task<bool> ValidateAsync(ClaimsPrincipal principal, int userId);
}