2026-06-01 17:59:23 +08:00
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
|
|
|
|
|
|
|
namespace QYZH.InteractiveMagazine.Infrastructure.Middleware;
|
|
|
|
|
|
|
2026-06-09 15:17:16 +08:00
|
|
|
|
/// <summary>
|
2026-07-10 10:44:00 +08:00
|
|
|
|
/// 保留兼容的JWT自动刷新中间件,实际刷新在认证成功后执行。
|
2026-06-09 15:17:16 +08:00
|
|
|
|
/// </summary>
|
2026-06-01 17:59:23 +08:00
|
|
|
|
public class JwtAutoRefreshMiddleware
|
|
|
|
|
|
{
|
|
|
|
|
|
private readonly RequestDelegate _next;
|
|
|
|
|
|
|
2026-07-10 10:44:00 +08:00
|
|
|
|
public JwtAutoRefreshMiddleware(RequestDelegate next)
|
2026-06-01 17:59:23 +08:00
|
|
|
|
{
|
|
|
|
|
|
_next = next;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async Task InvokeAsync(HttpContext context)
|
|
|
|
|
|
{
|
|
|
|
|
|
await _next(context);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|