|
|
|
@ -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}");
|
|
|
|
|