Browse Source
Merge pull request #2027 from abpframework/maliming/patch-3
Upgrade Ocelot to support net core 3.0
pull/2079/head
Halil İbrahim Kalkan
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with
20 additions and
8 deletions
-
samples/MicroserviceDemo/applications/AuthServer.Host/AuthServerDataSeeder.cs
-
samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminAppHostModule.cs
-
samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSiteHostModule.cs
-
samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj
-
samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGatewayHostModule.cs
-
samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj
-
samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGatewayHostModule.cs
-
samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj
-
samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGatewayHostModule.cs
|
|
|
@ -117,6 +117,7 @@ namespace AuthServer.Host |
|
|
|
commonScopes.Union(new[] { "BackendAdminAppGateway", "IdentityService", "ProductService" }), |
|
|
|
new[] { "hybrid" }, |
|
|
|
commonSecret, |
|
|
|
permissions: new[] { IdentityPermissions.Users.Default, "ProductManagement.Product" }, |
|
|
|
redirectUri: "http://localhost:51954/signin-oidc", |
|
|
|
postLogoutRedirectUri: "http://localhost:51954/signout-callback-oidc" |
|
|
|
); |
|
|
|
|
|
|
|
@ -54,7 +54,6 @@ namespace BackendAdminApp.Host |
|
|
|
}) |
|
|
|
.AddCookie("Cookies", options => |
|
|
|
{ |
|
|
|
options.Cookie.Expiration = TimeSpan.FromDays(365); |
|
|
|
options.ExpireTimeSpan = TimeSpan.FromDays(365); |
|
|
|
}) |
|
|
|
.AddOpenIdConnect("oidc", options => |
|
|
|
@ -100,6 +99,7 @@ namespace BackendAdminApp.Host |
|
|
|
app.UseVirtualFiles(); |
|
|
|
app.UseRouting(); |
|
|
|
app.UseAuthentication(); |
|
|
|
app.UseAuthorization(); |
|
|
|
app.UseAbpRequestLocalization(); |
|
|
|
app.UseSwagger(); |
|
|
|
app.UseSwaggerUI(options => |
|
|
|
|
|
|
|
@ -52,7 +52,6 @@ namespace PublicWebSite.Host |
|
|
|
}) |
|
|
|
.AddCookie("Cookies", options => |
|
|
|
{ |
|
|
|
options.Cookie.Expiration = TimeSpan.FromDays(365); |
|
|
|
options.ExpireTimeSpan = TimeSpan.FromDays(365); |
|
|
|
}) |
|
|
|
.AddOpenIdConnect("oidc", options => |
|
|
|
|
|
|
|
@ -16,7 +16,7 @@ |
|
|
|
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" /> |
|
|
|
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="6.5.0" /> |
|
|
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" /> |
|
|
|
<PackageReference Include="Ocelot" Version="13.5.2" /> |
|
|
|
<PackageReference Include="Ocelot" Version="13.8.0" /> |
|
|
|
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.0" /> |
|
|
|
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.0.0" /> |
|
|
|
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="3.0.0" /> |
|
|
|
|
|
|
|
@ -103,7 +103,11 @@ namespace BackendAdminAppGateway.Host |
|
|
|
app.MapWhen( |
|
|
|
ctx => ctx.Request.Path.ToString().StartsWith("/api/abp/") || |
|
|
|
ctx.Request.Path.ToString().StartsWith("/Abp/"), |
|
|
|
app2 => { app2.UseMvcWithDefaultRouteAndArea(); } |
|
|
|
app2 => |
|
|
|
{ |
|
|
|
app2.UseRouting(); |
|
|
|
app2.UseMvcWithDefaultRouteAndArea(); |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
app.UseOcelot().Wait(); |
|
|
|
|
|
|
|
@ -16,7 +16,7 @@ |
|
|
|
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" /> |
|
|
|
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="6.5.0" /> |
|
|
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" /> |
|
|
|
<PackageReference Include="Ocelot" Version="13.5.2" /> |
|
|
|
<PackageReference Include="Ocelot" Version="13.8.0" /> |
|
|
|
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.0" /> |
|
|
|
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.0.0" /> |
|
|
|
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="3.0.0" /> |
|
|
|
|
|
|
|
@ -94,7 +94,11 @@ namespace InternalGateway.Host |
|
|
|
ctx.Request.Path.ToString().StartsWith("/api/abp/") || |
|
|
|
ctx.Request.Path.ToString().StartsWith("/Abp/") || |
|
|
|
ctx.Request.Path.ToString().StartsWith("/Test/"), |
|
|
|
app2 => { app2.UseMvcWithDefaultRouteAndArea(); } |
|
|
|
app2 => |
|
|
|
{ |
|
|
|
app2.UseRouting(); |
|
|
|
app2.UseMvcWithDefaultRouteAndArea(); |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
app.UseOcelot().Wait(); |
|
|
|
|
|
|
|
@ -16,7 +16,7 @@ |
|
|
|
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" /> |
|
|
|
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="6.5.0" /> |
|
|
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" /> |
|
|
|
<PackageReference Include="Ocelot" Version="13.5.2" /> |
|
|
|
<PackageReference Include="Ocelot" Version="13.8.0" /> |
|
|
|
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.0" /> |
|
|
|
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.0.0" /> |
|
|
|
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="3.0.0" /> |
|
|
|
|
|
|
|
@ -90,7 +90,11 @@ namespace PublicWebSiteGateway.Host |
|
|
|
app.MapWhen( |
|
|
|
ctx => ctx.Request.Path.ToString().StartsWith("/api/abp/") || |
|
|
|
ctx.Request.Path.ToString().StartsWith("/Abp/"), |
|
|
|
app2 => { app2.UseMvcWithDefaultRouteAndArea(); } |
|
|
|
app2 => |
|
|
|
{ |
|
|
|
app2.UseRouting(); |
|
|
|
app2.UseMvcWithDefaultRouteAndArea(); |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
app.UseOcelot().Wait(); |
|
|
|
|