From 4425c534132531a8ff58e013db60a90c89af2ab2 Mon Sep 17 00:00:00 2001 From: jianweie code Date: Fri, 17 Nov 2023 13:25:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=95=E5=B1=82=E6=A1=86=E6=9E=B6=E4=BB=8E.n?= =?UTF-8?q?et7=E5=8D=87=E7=BA=A7=E5=88=B0.net8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CoreCms.Net.Auth/AuthorizationSetup.cs | 17 +++---- CoreCms.Net.Auth/CoreCms.Net.Auth.csproj | 6 +-- .../CoreCms.Net.Caching.csproj | 10 ++-- .../CoreCms.Net.CodeGenerator.csproj | 4 +- .../CoreCms.Net.Configuration.csproj | 6 +-- CoreCms.Net.Core/CoreCms.Net.Core.csproj | 24 +++++----- CoreCms.Net.DTO/CoreCms.Net.DTO.csproj | 2 +- CoreCms.Net.Filter/CoreCms.Net.Filter.csproj | 2 +- .../CoreCms.Net.IRepository.csproj | 2 +- .../CoreCms.Net.IServices.csproj | 2 +- CoreCms.Net.Loging/CoreCms.Net.Loging.csproj | 6 +-- .../CoreCms.Net.Mapping.csproj | 2 +- .../CoreCms.Net.Middlewares.csproj | 2 +- CoreCms.Net.Model/CoreCms.Net.Model.csproj | 6 +-- .../CoreCms.Net.RedisMQ.csproj | 10 ++-- .../CoreCms.Net.Repository.csproj | 4 +- .../CoreCms.Net.Services.csproj | 16 +++---- .../CoreCms.Net.Swagger.csproj | 4 +- CoreCms.Net.Task/CoreCms.Net.Task.csproj | 6 +-- .../CoreCms.Net.Uni-App.csproj | 2 +- .../CoreCms.Net.Utility.csproj | 6 +-- .../CoreCms.Net.WeChat.Service.csproj | 10 ++-- .../CoreCms.Net.Web.Admin.csproj | 46 +++++++++---------- .../CoreCms.Net.Web.WebApi.csproj | 40 ++++++++-------- 24 files changed, 118 insertions(+), 117 deletions(-) diff --git a/CoreCms.Net.Auth/AuthorizationSetup.cs b/CoreCms.Net.Auth/AuthorizationSetup.cs index 2a6f4f06..450d9e58 100644 --- a/CoreCms.Net.Auth/AuthorizationSetup.cs +++ b/CoreCms.Net.Auth/AuthorizationSetup.cs @@ -21,6 +21,7 @@ using CoreCms.Net.Utility.Extensions; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; using Microsoft.IdentityModel.Tokens; @@ -101,7 +102,7 @@ namespace CoreCms.Net.Auth { OnChallenge = context => { - context.Response.Headers.Add("Token-Error", context.ErrorDescription); + context.Response.Headers.Append("Token-Error", context.ErrorDescription); return Task.CompletedTask; }, OnAuthenticationFailed = context => @@ -111,18 +112,18 @@ namespace CoreCms.Net.Auth if (jwtToken.Issuer != issuer) { - context.Response.Headers.Add("Token-Error-Iss", "issuer is wrong!"); + context.Response.Headers.Append("Token-Error-Iss", "issuer is wrong!"); } if (jwtToken.Audiences.FirstOrDefault() != audience) { - context.Response.Headers.Add("Token-Error-Aud", "Audience is wrong!"); + context.Response.Headers.Append("Token-Error-Aud", "Audience is wrong!"); } // 如果过期,则把<是否过期>添加到,返回头信息中 if (context.Exception.GetType() == typeof(SecurityTokenExpiredException)) { - context.Response.Headers.Add("Token-Expired", "true"); + context.Response.Headers.Append("Token-Expired", "true"); } return Task.CompletedTask; } @@ -206,7 +207,7 @@ namespace CoreCms.Net.Auth { OnChallenge = context => { - context.Response.Headers.Add("Token-Error", context.ErrorDescription); + context.Response.Headers.Append("Token-Error", context.ErrorDescription); return Task.CompletedTask; }, OnAuthenticationFailed = context => @@ -216,18 +217,18 @@ namespace CoreCms.Net.Auth if (jwtToken.Issuer != issuer) { - context.Response.Headers.Add("Token-Error-Iss", "issuer is wrong!"); + context.Response.Headers.Append("Token-Error-Iss", "issuer is wrong!"); } if (jwtToken.Audiences.FirstOrDefault() != audience) { - context.Response.Headers.Add("Token-Error-Aud", "Audience is wrong!"); + context.Response.Headers.Append("Token-Error-Aud", "Audience is wrong!"); } // 如果过期,则把<是否过期>添加到,返回头信息中 if (context.Exception.GetType() == typeof(SecurityTokenExpiredException)) { - context.Response.Headers.Add("Token-Expired", "true"); + context.Response.Headers.Append("Token-Expired", "true"); } return Task.CompletedTask; } diff --git a/CoreCms.Net.Auth/CoreCms.Net.Auth.csproj b/CoreCms.Net.Auth/CoreCms.Net.Auth.csproj index 9da50e0d..e46e2544 100644 --- a/CoreCms.Net.Auth/CoreCms.Net.Auth.csproj +++ b/CoreCms.Net.Auth/CoreCms.Net.Auth.csproj @@ -1,12 +1,12 @@ - net7.0 + net8.0 - - + + diff --git a/CoreCms.Net.Caching/CoreCms.Net.Caching.csproj b/CoreCms.Net.Caching/CoreCms.Net.Caching.csproj index 664446ed..ca0dcaba 100644 --- a/CoreCms.Net.Caching/CoreCms.Net.Caching.csproj +++ b/CoreCms.Net.Caching/CoreCms.Net.Caching.csproj @@ -1,14 +1,14 @@ - net7.0 + net8.0 - - - - + + + + diff --git a/CoreCms.Net.CodeGenerator/CoreCms.Net.CodeGenerator.csproj b/CoreCms.Net.CodeGenerator/CoreCms.Net.CodeGenerator.csproj index 73523ed2..ece28de9 100644 --- a/CoreCms.Net.CodeGenerator/CoreCms.Net.CodeGenerator.csproj +++ b/CoreCms.Net.CodeGenerator/CoreCms.Net.CodeGenerator.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 @@ -48,7 +48,7 @@ - + diff --git a/CoreCms.Net.Configuration/CoreCms.Net.Configuration.csproj b/CoreCms.Net.Configuration/CoreCms.Net.Configuration.csproj index 07fa2969..697c85ee 100644 --- a/CoreCms.Net.Configuration/CoreCms.Net.Configuration.csproj +++ b/CoreCms.Net.Configuration/CoreCms.Net.Configuration.csproj @@ -1,13 +1,13 @@ - net7.0 + net8.0 - - + + diff --git a/CoreCms.Net.Core/CoreCms.Net.Core.csproj b/CoreCms.Net.Core/CoreCms.Net.Core.csproj index 662bef30..146c6538 100644 --- a/CoreCms.Net.Core/CoreCms.Net.Core.csproj +++ b/CoreCms.Net.Core/CoreCms.Net.Core.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 @@ -13,21 +13,21 @@ - + - - - + + + - - - - - + + + + + - - + + diff --git a/CoreCms.Net.DTO/CoreCms.Net.DTO.csproj b/CoreCms.Net.DTO/CoreCms.Net.DTO.csproj index c36e74d7..938d50a9 100644 --- a/CoreCms.Net.DTO/CoreCms.Net.DTO.csproj +++ b/CoreCms.Net.DTO/CoreCms.Net.DTO.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 disable enable diff --git a/CoreCms.Net.Filter/CoreCms.Net.Filter.csproj b/CoreCms.Net.Filter/CoreCms.Net.Filter.csproj index e5e9628a..92052a40 100644 --- a/CoreCms.Net.Filter/CoreCms.Net.Filter.csproj +++ b/CoreCms.Net.Filter/CoreCms.Net.Filter.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 diff --git a/CoreCms.Net.IRepository/CoreCms.Net.IRepository.csproj b/CoreCms.Net.IRepository/CoreCms.Net.IRepository.csproj index 5241667c..c9dcb387 100644 --- a/CoreCms.Net.IRepository/CoreCms.Net.IRepository.csproj +++ b/CoreCms.Net.IRepository/CoreCms.Net.IRepository.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 diff --git a/CoreCms.Net.IServices/CoreCms.Net.IServices.csproj b/CoreCms.Net.IServices/CoreCms.Net.IServices.csproj index f82821ab..401baab5 100644 --- a/CoreCms.Net.IServices/CoreCms.Net.IServices.csproj +++ b/CoreCms.Net.IServices/CoreCms.Net.IServices.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 diff --git a/CoreCms.Net.Loging/CoreCms.Net.Loging.csproj b/CoreCms.Net.Loging/CoreCms.Net.Loging.csproj index 1b477533..61972cf1 100644 --- a/CoreCms.Net.Loging/CoreCms.Net.Loging.csproj +++ b/CoreCms.Net.Loging/CoreCms.Net.Loging.csproj @@ -1,13 +1,13 @@ - net7.0 + net8.0 - + - + diff --git a/CoreCms.Net.Mapping/CoreCms.Net.Mapping.csproj b/CoreCms.Net.Mapping/CoreCms.Net.Mapping.csproj index 59eed489..0602dd96 100644 --- a/CoreCms.Net.Mapping/CoreCms.Net.Mapping.csproj +++ b/CoreCms.Net.Mapping/CoreCms.Net.Mapping.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 diff --git a/CoreCms.Net.Middlewares/CoreCms.Net.Middlewares.csproj b/CoreCms.Net.Middlewares/CoreCms.Net.Middlewares.csproj index 084f0a17..fc8f8563 100644 --- a/CoreCms.Net.Middlewares/CoreCms.Net.Middlewares.csproj +++ b/CoreCms.Net.Middlewares/CoreCms.Net.Middlewares.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 diff --git a/CoreCms.Net.Model/CoreCms.Net.Model.csproj b/CoreCms.Net.Model/CoreCms.Net.Model.csproj index dc725d67..60e2dcea 100644 --- a/CoreCms.Net.Model/CoreCms.Net.Model.csproj +++ b/CoreCms.Net.Model/CoreCms.Net.Model.csproj @@ -1,14 +1,14 @@ - net7.0 + net8.0 True CoreCms.Net.Model.xml - - + + diff --git a/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj b/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj index 2f07d6e4..ed58514f 100644 --- a/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj +++ b/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj @@ -1,14 +1,14 @@ - net7.0 + net8.0 - - - - + + + + diff --git a/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj b/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj index 1b0a9ec7..89ce94b6 100644 --- a/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj +++ b/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj @@ -1,12 +1,12 @@ - net7.0 + net8.0 - + diff --git a/CoreCms.Net.Services/CoreCms.Net.Services.csproj b/CoreCms.Net.Services/CoreCms.Net.Services.csproj index 00717743..650c8a86 100644 --- a/CoreCms.Net.Services/CoreCms.Net.Services.csproj +++ b/CoreCms.Net.Services/CoreCms.Net.Services.csproj @@ -1,22 +1,22 @@ - net7.0 + net8.0 - - + + - - - + + + - - + + diff --git a/CoreCms.Net.Swagger/CoreCms.Net.Swagger.csproj b/CoreCms.Net.Swagger/CoreCms.Net.Swagger.csproj index 398ec081..4e048011 100644 --- a/CoreCms.Net.Swagger/CoreCms.Net.Swagger.csproj +++ b/CoreCms.Net.Swagger/CoreCms.Net.Swagger.csproj @@ -1,12 +1,12 @@ - net7.0 + net8.0 - + diff --git a/CoreCms.Net.Task/CoreCms.Net.Task.csproj b/CoreCms.Net.Task/CoreCms.Net.Task.csproj index 87642a75..97168751 100644 --- a/CoreCms.Net.Task/CoreCms.Net.Task.csproj +++ b/CoreCms.Net.Task/CoreCms.Net.Task.csproj @@ -1,12 +1,12 @@ - net7.0 + net8.0 - - + + diff --git a/CoreCms.Net.Uni-App/CoreCms.Net.Uni-App.csproj b/CoreCms.Net.Uni-App/CoreCms.Net.Uni-App.csproj index e9084626..8fbbab56 100644 --- a/CoreCms.Net.Uni-App/CoreCms.Net.Uni-App.csproj +++ b/CoreCms.Net.Uni-App/CoreCms.Net.Uni-App.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 diff --git a/CoreCms.Net.Utility/CoreCms.Net.Utility.csproj b/CoreCms.Net.Utility/CoreCms.Net.Utility.csproj index de7609e0..193fc792 100644 --- a/CoreCms.Net.Utility/CoreCms.Net.Utility.csproj +++ b/CoreCms.Net.Utility/CoreCms.Net.Utility.csproj @@ -1,13 +1,13 @@ - net7.0 + net8.0 - + - + diff --git a/CoreCms.Net.WeChat.Service/CoreCms.Net.WeChat.Service.csproj b/CoreCms.Net.WeChat.Service/CoreCms.Net.WeChat.Service.csproj index 06f34b0a..0ce53ac9 100644 --- a/CoreCms.Net.WeChat.Service/CoreCms.Net.WeChat.Service.csproj +++ b/CoreCms.Net.WeChat.Service/CoreCms.Net.WeChat.Service.csproj @@ -1,16 +1,16 @@ - net7.0 + net8.0 - + - - + + - + diff --git a/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj b/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj index f5017f5a..7fc25b38 100644 --- a/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj +++ b/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 zh-Hans false b93911e3-96d4-453b-aa87-357c154804c2 @@ -47,31 +47,31 @@ - + - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + - - - + + + diff --git a/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.csproj b/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.csproj index 9214daa9..c220c22e 100644 --- a/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.csproj +++ b/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 zh-Hans false 077906fd-e490-4431-9bae-c3a48ae21992 @@ -51,30 +51,30 @@ - + - - - - - - + + + + + + - - - - + + + + - - - + + + - - - + + + - - + +