Browse Source
Set `AddDevelopmentEncryptionAndSigningCertificate` to `false`.
pull/17512/head
maliming
2 years ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
12 changed files with
55 additions and
6 deletions
-
modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Microsoft/Extensions/DependencyInjection/OpenIddictServerBuilderExtensions.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyProjectNameModule.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameModule.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/MyProjectNameHostModule.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/MyProjectNameHostModule.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/MyProjectNameModule.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/MyProjectNameModule.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/MyProjectNameModule.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyProjectNameModule.cs
-
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/MyProjectNameAuthServerModule.cs
-
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameBlazorModule.cs
-
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs
|
|
|
@ -1,6 +1,5 @@ |
|
|
|
using System.IO; |
|
|
|
using System.Security.Cryptography.X509Certificates; |
|
|
|
using Volo.Abp.OpenIddict; |
|
|
|
|
|
|
|
namespace Microsoft.Extensions.DependencyInjection; |
|
|
|
|
|
|
|
@ -8,11 +7,6 @@ public static class OpenIddictServerBuilderExtensions |
|
|
|
{ |
|
|
|
public static OpenIddictServerBuilder AddProductionEncryptionAndSigningCertificate(this OpenIddictServerBuilder builder, string fileName, string passPhrase) |
|
|
|
{ |
|
|
|
builder.Services.PreConfigure<AbpOpenIddictAspNetCoreOptions>(options => |
|
|
|
{ |
|
|
|
options.AddDevelopmentEncryptionAndSigningCertificate = false; |
|
|
|
}); |
|
|
|
|
|
|
|
if (!File.Exists(fileName)) |
|
|
|
{ |
|
|
|
throw new FileNotFoundException($"Signing Certificate couldn't found: {fileName}"); |
|
|
|
|
|
|
|
@ -134,6 +134,11 @@ public class MyProjectNameModule : AbpModule |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options => |
|
|
|
{ |
|
|
|
options.AddDevelopmentEncryptionAndSigningCertificate = false; |
|
|
|
}); |
|
|
|
|
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
|
|
|
|
@ -136,6 +136,11 @@ public class MyProjectNameModule : AbpModule |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options => |
|
|
|
{ |
|
|
|
options.AddDevelopmentEncryptionAndSigningCertificate = false; |
|
|
|
}); |
|
|
|
|
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
|
|
|
|
@ -121,6 +121,11 @@ public class MyProjectNameHostModule : AbpModule |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options => |
|
|
|
{ |
|
|
|
options.AddDevelopmentEncryptionAndSigningCertificate = false; |
|
|
|
}); |
|
|
|
|
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
|
|
|
|
@ -124,6 +124,11 @@ public class MyProjectNameHostModule : AbpModule |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options => |
|
|
|
{ |
|
|
|
options.AddDevelopmentEncryptionAndSigningCertificate = false; |
|
|
|
}); |
|
|
|
|
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
|
|
|
|
@ -122,6 +122,11 @@ public class MyProjectNameModule : AbpModule |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options => |
|
|
|
{ |
|
|
|
options.AddDevelopmentEncryptionAndSigningCertificate = false; |
|
|
|
}); |
|
|
|
|
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
|
|
|
|
@ -125,6 +125,11 @@ public class MyProjectNameModule : AbpModule |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options => |
|
|
|
{ |
|
|
|
options.AddDevelopmentEncryptionAndSigningCertificate = false; |
|
|
|
}); |
|
|
|
|
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
|
|
|
|
@ -128,6 +128,11 @@ public class MyProjectNameModule : AbpModule |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options => |
|
|
|
{ |
|
|
|
options.AddDevelopmentEncryptionAndSigningCertificate = false; |
|
|
|
}); |
|
|
|
|
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
|
|
|
|
@ -130,6 +130,11 @@ public class MyProjectNameModule : AbpModule |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options => |
|
|
|
{ |
|
|
|
options.AddDevelopmentEncryptionAndSigningCertificate = false; |
|
|
|
}); |
|
|
|
|
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
|
|
|
|
@ -67,6 +67,11 @@ public class MyProjectNameAuthServerModule : AbpModule |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options => |
|
|
|
{ |
|
|
|
options.AddDevelopmentEncryptionAndSigningCertificate = false; |
|
|
|
}); |
|
|
|
|
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
|
|
|
|
@ -89,6 +89,11 @@ public class MyProjectNameBlazorModule : AbpModule |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options => |
|
|
|
{ |
|
|
|
options.AddDevelopmentEncryptionAndSigningCertificate = false; |
|
|
|
}); |
|
|
|
|
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
|
|
|
|
@ -84,6 +84,11 @@ public class MyProjectNameWebModule : AbpModule |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options => |
|
|
|
{ |
|
|
|
options.AddDevelopmentEncryptionAndSigningCertificate = false; |
|
|
|
}); |
|
|
|
|
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
|