Browse Source
Use a new method to configure `OpenIddictServerBuilder`.
pull/17512/head
maliming
3 years ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
11 changed files with
77 additions and
77 deletions
-
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
|
|
|
@ -130,15 +130,15 @@ public class MyProjectNameModule : AbpModule |
|
|
|
options.UseLocalServer(); |
|
|
|
options.UseAspNetCore(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
|
|
|
|
@ -132,15 +132,15 @@ public class MyProjectNameModule : AbpModule |
|
|
|
options.UseLocalServer(); |
|
|
|
options.UseAspNetCore(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
|
|
|
|
@ -117,15 +117,15 @@ public class MyProjectNameHostModule : AbpModule |
|
|
|
options.UseLocalServer(); |
|
|
|
options.UseAspNetCore(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
|
|
|
|
@ -120,15 +120,15 @@ public class MyProjectNameHostModule : AbpModule |
|
|
|
options.UseLocalServer(); |
|
|
|
options.UseAspNetCore(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
|
|
|
|
@ -118,15 +118,15 @@ public class MyProjectNameModule : AbpModule |
|
|
|
options.UseLocalServer(); |
|
|
|
options.UseAspNetCore(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
|
|
|
|
@ -121,15 +121,15 @@ public class MyProjectNameModule : AbpModule |
|
|
|
options.UseLocalServer(); |
|
|
|
options.UseAspNetCore(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
|
|
|
|
@ -124,15 +124,15 @@ public class MyProjectNameModule : AbpModule |
|
|
|
options.UseLocalServer(); |
|
|
|
options.UseAspNetCore(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
|
|
|
|
@ -126,15 +126,15 @@ public class MyProjectNameModule : AbpModule |
|
|
|
options.UseLocalServer(); |
|
|
|
options.UseAspNetCore(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
|
|
|
|
@ -63,15 +63,15 @@ public class MyProjectNameAuthServerModule : AbpModule |
|
|
|
options.UseLocalServer(); |
|
|
|
options.UseAspNetCore(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
|
|
|
|
@ -85,15 +85,15 @@ public class MyProjectNameBlazorModule : AbpModule |
|
|
|
options.UseLocalServer(); |
|
|
|
options.UseAspNetCore(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
|
|
|
|
@ -80,15 +80,15 @@ public class MyProjectNameWebModule : AbpModule |
|
|
|
options.UseLocalServer(); |
|
|
|
options.UseAspNetCore(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictServerBuilder>(serverBuilder => |
|
|
|
{ |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
|