diff --git a/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServerDataSeeder.cs b/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServerDataSeeder.cs
index b10c5d626c..03850e6d4f 100644
--- a/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServerDataSeeder.cs
+++ b/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServerDataSeeder.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"
);
diff --git a/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminAppHostModule.cs b/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminAppHostModule.cs
index 13c4577cc0..d04fc1e656 100644
--- a/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminAppHostModule.cs
+++ b/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminAppHostModule.cs
@@ -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 =>
diff --git a/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSiteHostModule.cs b/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSiteHostModule.cs
index 0843eae579..66ea6d174c 100644
--- a/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSiteHostModule.cs
+++ b/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSiteHostModule.cs
@@ -52,7 +52,6 @@ namespace PublicWebSite.Host
})
.AddCookie("Cookies", options =>
{
- options.Cookie.Expiration = TimeSpan.FromDays(365);
options.ExpireTimeSpan = TimeSpan.FromDays(365);
})
.AddOpenIdConnect("oidc", options =>
diff --git a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj
index 35f2d6318b..3a944bec65 100644
--- a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj
+++ b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGatewayHostModule.cs b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGatewayHostModule.cs
index 45fe70e03f..d30dc8e4fb 100644
--- a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGatewayHostModule.cs
+++ b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGatewayHostModule.cs
@@ -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();
diff --git a/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj b/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj
index ea060feff3..4ce9e7f630 100644
--- a/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj
+++ b/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGatewayHostModule.cs b/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGatewayHostModule.cs
index 1232852126..8b470f826f 100644
--- a/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGatewayHostModule.cs
+++ b/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGatewayHostModule.cs
@@ -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();
diff --git a/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj b/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj
index d27c3bfbeb..313fda2630 100644
--- a/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj
+++ b/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGatewayHostModule.cs b/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGatewayHostModule.cs
index 2513c16c00..2add48443a 100644
--- a/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGatewayHostModule.cs
+++ b/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGatewayHostModule.cs
@@ -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();