refactor: remove unused param

This commit is contained in:
Polianin Nikita 2024-10-09 03:02:35 +03:00
parent 1f3aaca3cf
commit 71e8eca5f4

View File

@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Mirea.Api.Security.Common.Interfaces;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Mirea.Api.Endpoint.Configuration.Core.Middleware; namespace Mirea.Api.Endpoint.Configuration.Core.Middleware;
@ -7,7 +6,7 @@ namespace Mirea.Api.Endpoint.Configuration.Core.Middleware;
public class CookieAuthorizationMiddleware(RequestDelegate next) public class CookieAuthorizationMiddleware(RequestDelegate next)
{ {
public const string JwtAuthorizationName = "_ajwt"; public const string JwtAuthorizationName = "_ajwt";
public async Task InvokeAsync(HttpContext context, IRevokedToken revokedTokenStore) public async Task InvokeAsync(HttpContext context)
{ {
if (context.Request.Cookies.ContainsKey(JwtAuthorizationName)) if (context.Request.Cookies.ContainsKey(JwtAuthorizationName))
context.Request.Headers.Authorization = "Bearer " + context.Request.Cookies[JwtAuthorizationName]; context.Request.Headers.Authorization = "Bearer " + context.Request.Cookies[JwtAuthorizationName];