From d85e2db0df4cfc55f111b2623f3911e9141e3bca Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Sat, 16 Mar 2024 02:53:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Authorize?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BBWYB.Server.API/Controllers/PurchaserController.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BBWYB.Server.API/Controllers/PurchaserController.cs b/BBWYB.Server.API/Controllers/PurchaserController.cs index 0bc88a4..5ebec9d 100644 --- a/BBWYB.Server.API/Controllers/PurchaserController.cs +++ b/BBWYB.Server.API/Controllers/PurchaserController.cs @@ -1,10 +1,13 @@ using BBWYB.Server.Business; using BBWYB.Server.Model.Db; using BBWYB.Server.Model.Dto; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; namespace BBWYB.Server.API.Controllers { + [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] public class PurchaserController : BaseApiController { private PurchaserBusiness purchaserBusiness;