14 lines
317 B
C#
14 lines
317 B
C#
using Tiku.Application.Security;
|
|
|
|
namespace Tiku.Api.Middleware;
|
|
|
|
public sealed class CurrentPrincipalMiddleware(RequestDelegate next)
|
|
{
|
|
public async Task InvokeAsync(
|
|
HttpContext context,
|
|
ICurrentUser currentUser)
|
|
{
|
|
currentUser.Load(context.User);
|
|
await next(context);
|
|
}
|
|
} |