Files
tiku-backend.net/Tiku.Api/Middleware/CurrentPrincipalMiddleware.cs
xiong c497a3ca8d
Some checks failed
ci / release-gate (push) Has been cancelled
清理代码
2026-08-03 12:31:39 +08:00

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);
}
}