diff --git a/OpenAuth.Mvc/Startup.cs b/OpenAuth.Mvc/Startup.cs index d94c88f4..12de26dd 100644 --- a/OpenAuth.Mvc/Startup.cs +++ b/OpenAuth.Mvc/Startup.cs @@ -6,7 +6,6 @@ using Infrastructure.Extensions.AutofacManager; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Http; -using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -70,7 +69,7 @@ namespace OpenAuth.Mvc { // This lambda determines whether user consent for non-essential cookies is needed for a given request. //关闭GDPR规范 - options.CheckConsentNeeded = context => false; + options.CheckConsentNeeded = (HttpContext context) => false; options.MinimumSameSitePolicy = SameSiteMode.None; }); @@ -99,8 +98,6 @@ namespace OpenAuth.Mvc services.AddHttpClient(); - services.AddDataProtection().PersistKeysToFileSystem(new DirectoryInfo(Configuration["DataProtection"])); - var sqlsugarTypes = UtilMethods.EnumToDictionary(); var dbType = sqlsugarTypes.FirstOrDefault(it => dbtypes.ToDictionary(u => u.Key, v => v.Value.ToLower()).ContainsValue(it.Key)); @@ -123,7 +120,6 @@ namespace OpenAuth.Mvc //设置定时启动的任务 services.AddHostedService(); - } public void ConfigureContainer(ContainerBuilder builder) diff --git a/OpenAuth.Mvc/temp-keys/key-628839e2-4f54-416f-9b66-23fafd007ab0.xml b/OpenAuth.Mvc/temp-keys/key-628839e2-4f54-416f-9b66-23fafd007ab0.xml deleted file mode 100644 index f3fef1fe..00000000 --- a/OpenAuth.Mvc/temp-keys/key-628839e2-4f54-416f-9b66-23fafd007ab0.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - 2020-04-24T08:26:04.9990208Z - 2020-04-24T08:26:04.9481282Z - 2020-07-23T08:26:04.9481282Z - - - - - - - blC9xnXdRf5Uytfd1qOaGG6Z9ouurZ4j3p9UUlOs54j0xEhqd01y0AmwUfrJDp37+HZqODq8vgzGz6xBDgv9ZQ== - - - - \ No newline at end of file diff --git a/OpenAuth.Mvc/temp-keys/key-dbe172a1-9e7b-4886-a94e-de8124a4bd0d.xml b/OpenAuth.Mvc/temp-keys/key-dbe172a1-9e7b-4886-a94e-de8124a4bd0d.xml deleted file mode 100644 index 9a66cbbe..00000000 --- a/OpenAuth.Mvc/temp-keys/key-dbe172a1-9e7b-4886-a94e-de8124a4bd0d.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - 2020-09-10T03:37:11.831349Z - 2020-09-10T03:37:11.7080375Z - 2020-12-09T03:37:11.7080375Z - - - - - - - Db49pYY35Nbu4v2FWzc+MuYyu8RO8z/T8pkaHAH/M6aeVmjyeXaBfHnmOiS5LMitCKDqGBTUh15xNCErxEvQzg== - - - - \ No newline at end of file diff --git a/OpenAuth.WebApi/Startup.cs b/OpenAuth.WebApi/Startup.cs index b23b5915..1c8f6683 100644 --- a/OpenAuth.WebApi/Startup.cs +++ b/OpenAuth.WebApi/Startup.cs @@ -130,7 +130,7 @@ namespace OpenAuth.WebApi // options.SuppressModelStateInvalidFilter = true; //启动WebAPI自动模态验证,处理返回值 - options.InvalidModelStateResponseFactory = context => + options.InvalidModelStateResponseFactory = (ActionContext context) => { var problems = new CustomBadRequest(context);