From 498363e5fcf0022cf06786ab8d03c59382ef3578 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 25 Jan 2022 13:41:45 +0300 Subject: [PATCH 1/3] Updated identityserver data seeder to seed multiple redirect uris --- .../DbMigrations/IdentityServerDataSeeder.cs | 100 +++++++++++------- 1 file changed, 61 insertions(+), 39 deletions(-) diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs index a5facdf7..c7caf15d 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs @@ -105,29 +105,16 @@ namespace EShopOnAbp.IdentityService.DbMigrations private async Task CreateSwaggerClientsAsync() { - await CreateSwaggerClientAsync("AccountService", - new[] { "AccountService"}); - - await CreateSwaggerClientAsync("IdentityService", - new[] { "IdentityService"}); - - await CreateSwaggerClientAsync("AdministrationService", - new[] { "AdministrationService" }); - - await CreateSwaggerClientAsync("CatalogService", - new[] { "CatalogService" }); - - await CreateSwaggerClientAsync("BasketService", - new[] { "BasketService" }); - - await CreateSwaggerClientAsync("OrderingService", - new[] { "OrderingService" }); - - await CreateSwaggerClientAsync("PaymentService", - new[] { "PaymentService" }); + await CreateWebGatewaySwaggerClientAsync("WebGateway", + new[] + { + "AccountService", "IdentityService", "AdministrationService", + "CatalogService", "BasketService", + "PaymentService", "OrderingService" + }); } - private async Task CreateSwaggerClientAsync(string name, string[] scopes = null) + private async Task CreateWebGatewaySwaggerClientAsync(string name, string[] scopes = null) { var commonScopes = new[] { @@ -138,22 +125,51 @@ namespace EShopOnAbp.IdentityService.DbMigrations "phone", "address" }; - scopes ??= new[] { name }; + scopes ??= new[] {name}; // Swagger Client var swaggerClientId = $"{name}_Swagger"; if (!swaggerClientId.IsNullOrWhiteSpace()) { - var swaggerRootUrl = _configuration[$"IdentityServerClients:{name}:RootUrl"].TrimEnd('/'); + var webGatewaySwaggerRootUrl = _configuration[$"IdentityServerClients:{name}:RootUrl"].TrimEnd('/'); + var publicWebGatewayRootUrl = _configuration[$"IdentityServerClients:PublicWebGateway:RootUrl"].TrimEnd('/'); + var accountServiceRootUrl = _configuration[$"IdentityServerClients:AccountService:RootUrl"].TrimEnd('/'); + var identityServiceRootUrl = _configuration[$"IdentityServerClients:IdentityService:RootUrl"].TrimEnd('/'); + var administrationServiceRootUrl = _configuration[$"IdentityServerClients:AdministrationService:RootUrl"].TrimEnd('/'); + var catalogServiceRootUrl = _configuration[$"IdentityServerClients:CatalogService:RootUrl"].TrimEnd('/'); + var basketServiceRootUrl = _configuration[$"IdentityServerClients:BasketService:RootUrl"].TrimEnd('/'); + var orderingServiceRootUrl = _configuration[$"IdentityServerClients:OrderingService:RootUrl"].TrimEnd('/'); + var paymentServiceRootUrl = _configuration[$"IdentityServerClients:PaymentService:RootUrl"].TrimEnd('/'); await CreateClientAsync( name: swaggerClientId, scopes: commonScopes.Union(scopes), - grantTypes: new[] { "authorization_code" }, + grantTypes: new[] {"authorization_code"}, secret: "1q2w3e*".Sha256(), requireClientSecret: false, - redirectUri: $"{swaggerRootUrl}/swagger/oauth2-redirect.html", - corsOrigins: new[] { swaggerRootUrl.RemovePostFix("/") } + redirectUris: new List + { + $"{webGatewaySwaggerRootUrl}/swagger/oauth2-redirect.html", // WebGateway redirect uri + $"{publicWebGatewayRootUrl}/swagger/oauth2-redirect.html", // PublicWebGateway redirect uri + $"{accountServiceRootUrl}/swagger/oauth2-redirect.html", // AccountService redirect uri + $"{identityServiceRootUrl}/swagger/oauth2-redirect.html", // IdentityService redirect uri + $"{administrationServiceRootUrl}/swagger/oauth2-redirect.html", // AdministrationService redirect uri + $"{catalogServiceRootUrl}/swagger/oauth2-redirect.html", // CatalogService redirect uri + $"{basketServiceRootUrl}/swagger/oauth2-redirect.html", // BasketService redirect uri + $"{orderingServiceRootUrl}/swagger/oauth2-redirect.html", // OrderingService redirect uri + $"{paymentServiceRootUrl}/swagger/oauth2-redirect.html" // PaymentService redirect uri + }, + corsOrigins: new[] + { + webGatewaySwaggerRootUrl.RemovePostFix("/"), + publicWebGatewayRootUrl.RemovePostFix("/"), + accountServiceRootUrl.RemovePostFix("/"), + administrationServiceRootUrl.RemovePostFix("/"), + catalogServiceRootUrl.RemovePostFix("/"), + basketServiceRootUrl.RemovePostFix("/"), + orderingServiceRootUrl.RemovePostFix("/"), + paymentServiceRootUrl.RemovePostFix("/") + } ); } } @@ -186,7 +202,7 @@ namespace EShopOnAbp.IdentityService.DbMigrations private async Task CreateApiScopeAsync(string name) { - var apiScope = await _apiScopeRepository.FindByNameAsync(name ); + var apiScope = await _apiScopeRepository.FindByNameAsync(name); if (apiScope == null) { apiScope = await _apiScopeRepository.InsertAsync( @@ -228,12 +244,12 @@ namespace EShopOnAbp.IdentityService.DbMigrations "PaymentService", "OrderingService" }), - grantTypes: new[] { "hybrid" }, + grantTypes: new[] {"hybrid"}, secret: "1q2w3e*".Sha256(), - redirectUri: $"{publicWebClientRootUrl}signin-oidc", + redirectUris: new List{ $"{publicWebClientRootUrl}signin-oidc" }, postLogoutRedirectUri: $"{publicWebClientRootUrl}signout-callback-oidc", frontChannelLogoutUri: $"{publicWebClientRootUrl}Account/FrontChannelLogout", - corsOrigins: new[] { publicWebClientRootUrl.RemovePostFix("/") } + corsOrigins: new[] {publicWebClientRootUrl.RemovePostFix("/")} ); //Angular Client @@ -247,13 +263,13 @@ namespace EShopOnAbp.IdentityService.DbMigrations "IdentityService", "AdministrationService" }), - grantTypes: new[] { "authorization_code", "LinkLogin", "password" }, + grantTypes: new[] {"authorization_code", "LinkLogin", "password"}, secret: "1q2w3e*".Sha256(), requirePkce: true, requireClientSecret: false, - redirectUri: $"{angularClientRootUrl}", + redirectUris: new List{ $"{angularClientRootUrl}" }, postLogoutRedirectUri: $"{angularClientRootUrl}", - corsOrigins: new[] { angularClientRootUrl } + corsOrigins: new[] {angularClientRootUrl} ); //Administration Service Client @@ -263,9 +279,9 @@ namespace EShopOnAbp.IdentityService.DbMigrations { "IdentityService" }), - grantTypes: new[] { "client_credentials" }, + grantTypes: new[] {"client_credentials"}, secret: "1q2w3e*".Sha256(), - permissions: new[] { IdentityPermissions.Users.Default } + permissions: new[] {IdentityPermissions.Users.Default} ); } @@ -274,7 +290,7 @@ namespace EShopOnAbp.IdentityService.DbMigrations IEnumerable scopes, IEnumerable grantTypes, string secret = null, - string redirectUri = null, + List redirectUris = null, string postLogoutRedirectUri = null, string frontChannelLogoutUri = null, bool requireClientSecret = true, @@ -333,11 +349,17 @@ namespace EShopOnAbp.IdentityService.DbMigrations } } - if (redirectUri != null) + if (redirectUris != null) { - if (client.FindRedirectUri(redirectUri) == null) + foreach (var redirectUri in redirectUris) { - client.AddRedirectUri(redirectUri); + if (redirectUri != null) + { + if (client.FindRedirectUri(redirectUri) == null) + { + client.AddRedirectUri(redirectUri); + } + } } } From a809601d58b5f64bcba6b92ff301a58b53ecad70 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 25 Jan 2022 13:42:01 +0300 Subject: [PATCH 2/3] updated swagger endpoints --- .../EShopOnAbp.AuthServer/appsettings.json | 2 +- .../EShopOnAbpWebPublicGatewayModule.cs | 24 ++++++++++++----- .../appsettings.json | 4 ++- .../EShopOnAbpWebGatewayModule.cs | 17 +++++++++++- .../AdministrationServiceHttpApiHostModule.cs | 7 +++-- .../appsettings.json | 2 +- .../appsettings.json | 2 +- .../appsettings.json | 2 +- .../IdentityServiceHttpApiHostModule.cs | 26 +++++++++++-------- .../appsettings.json | 2 +- .../appsettings.json | 2 +- .../appsettings.json | 2 +- 12 files changed, 63 insertions(+), 29 deletions(-) diff --git a/apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json b/apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json index 20b0b62f..290fc0f6 100644 --- a/apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json +++ b/apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json @@ -14,7 +14,7 @@ "AuthServer": { "Authority": "https://localhost:44330", "RequireHttpsMetadata": "true", - "SwaggerClientId": "AccountService_Swagger", + "SwaggerClientId": "WebGateway_Swagger", "SwaggerClientSecret": "1q2w3e*" }, "AllowedHosts": "*", diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs index 95ca4f5c..33d9554e 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs @@ -24,7 +24,21 @@ namespace EShopOnAbp.WebPublicGateway var configuration = context.Services.GetConfiguration(); var hostingEnvironment = context.Services.GetHostingEnvironment(); - SwaggerConfigurationHelper.Configure(context, "WebPublic Gateway"); + SwaggerWithAuthConfigurationHelper.Configure( + context: context, + authority: configuration["AuthServer:Authority"], + scopes: new Dictionary /* Requested scopes for authorization code request and descriptions for swagger UI only */ + { + { "AccountService", "Account Service API" }, + { "IdentityService", "Identity Service API" }, + { "AdministrationService", "Administration Service API" }, + { "CatalogService", "Catalog Service API" }, + { "BasketService", "Basket Service API" }, + { "PaymentService", "Payment Service API" }, + { "OrderingService", "Ordering Service API" }, + }, + apiTitle: "WebPublic Gateway" + ); } public override void OnApplicationInitialization(ApplicationInitializationContext context) @@ -59,12 +73,8 @@ namespace EShopOnAbp.WebPublicGateway } options.SwaggerEndpoint($"{url}/swagger/v1/swagger.json", $"{config.ServiceKey} API"); - // options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); - // options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]); - - // TODO: Find a way to get these configurations from related running applications settings. - // options.OAuthClientId($"{config.ServiceKey.Replace(" ","")}_Swagger"); - // options.OAuthClientSecret("1q2w3e*"); + options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); + options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]); } }); app.MapWhen( diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json index 39f6f0a0..1eee0654 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json @@ -5,7 +5,9 @@ }, "AuthServer": { "Authority": "https://localhost:44330", - "RequireHttpsMetadata": "true" + "RequireHttpsMetadata": "true", + "SwaggerClientId": "WebGateway_Swagger", + "SwaggerClientSecret": "1q2w3e*" }, "Logging": { "LogLevel": { diff --git a/gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs b/gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs index b933506b..34bfa808 100644 --- a/gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs +++ b/gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs @@ -24,7 +24,22 @@ namespace EShopOnAbp.WebGateway { var configuration = context.Services.GetConfiguration(); var hostingEnvironment = context.Services.GetHostingEnvironment(); - SwaggerConfigurationHelper.Configure(context, "Web Gateway"); + + SwaggerWithAuthConfigurationHelper.Configure( + context: context, + authority: configuration["AuthServer:Authority"], + scopes: new Dictionary /* Requested scopes for authorization code request and descriptions for swagger UI only */ + { + { "AccountService", "Account Service API" }, + { "IdentityService", "Identity Service API" }, + { "AdministrationService", "Administration Service API" }, + { "CatalogService", "Catalog Service API" }, + { "BasketService", "Basket Service API" }, + { "PaymentService", "Payment Service API" }, + { "OrderingService", "Ordering Service API" }, + }, + apiTitle: "Web Gateway" + ); context.Services.AddCors(options => { diff --git a/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/AdministrationServiceHttpApiHostModule.cs b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/AdministrationServiceHttpApiHostModule.cs index c87c1594..6c33cb8d 100644 --- a/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/AdministrationServiceHttpApiHostModule.cs +++ b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/AdministrationServiceHttpApiHostModule.cs @@ -7,6 +7,7 @@ using EShopOnAbp.Shared.Hosting.AspNetCore; using EShopOnAbp.Shared.Hosting.Microservices; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Cors; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Volo.Abp; @@ -34,14 +35,13 @@ namespace EShopOnAbp.AdministrationService var configuration = context.Services.GetConfiguration(); JwtBearerConfigurationHelper.Configure(context, "AdministrationService"); - // SwaggerConfigurationHelper.Configure(context, "Administration Service API"); SwaggerWithAuthConfigurationHelper.Configure( context: context, authority: configuration["AuthServer:Authority"], scopes: new Dictionary /* Requested scopes for authorization code request and descriptions for swagger UI only */ { - {"Administration", "Administration Service API"}, + {"AdministrationService", "Administration Service API"}, }, apiTitle: "Administration Service API" ); @@ -87,7 +87,10 @@ namespace EShopOnAbp.AdministrationService app.UseSwagger(); app.UseSwaggerUI(options => { + var configuration = context.ServiceProvider.GetRequiredService(); options.SwaggerEndpoint("/swagger/v1/swagger.json", "Administration Service API"); + options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); + options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]); }); app.UseAbpSerilogEnrichers(); app.UseAuditing(); diff --git a/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json index 19c9900c..8610b450 100644 --- a/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json +++ b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json @@ -6,7 +6,7 @@ "AuthServer": { "Authority": "https://localhost:44330", "RequireHttpsMetadata": "true", - "SwaggerClientId": "AdministrationService_Swagger", + "SwaggerClientId": "WebGateway_Swagger", "SwaggerClientSecret": "1q2w3e*" }, "RemoteServices": { diff --git a/services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/appsettings.json b/services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/appsettings.json index 5168b4bf..2e9949c5 100644 --- a/services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/appsettings.json +++ b/services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/appsettings.json @@ -6,7 +6,7 @@ "AuthServer": { "Authority": "https://localhost:44330", "RequireHttpsMetadata": "true", - "SwaggerClientId": "BasketService_Swagger", + "SwaggerClientId": "WebGateway_Swagger", "SwaggerClientSecret": "1q2w3e*" }, "RemoteServices": { diff --git a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json index ed868ed2..7b5799db 100644 --- a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json +++ b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json @@ -6,7 +6,7 @@ "AuthServer": { "Authority": "https://localhost:44330", "RequireHttpsMetadata": "true", - "SwaggerClientId": "CatalogService_Swagger", + "SwaggerClientId": "WebGateway_Swagger", "SwaggerClientSecret": "1q2w3e*" }, "Logging": { diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/IdentityServiceHttpApiHostModule.cs b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/IdentityServiceHttpApiHostModule.cs index 44e5a01f..415c2304 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/IdentityServiceHttpApiHostModule.cs +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/IdentityServiceHttpApiHostModule.cs @@ -8,6 +8,7 @@ using EShopOnAbp.Shared.Hosting.Gateways; using EShopOnAbp.Shared.Hosting.Microservices; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Cors; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Volo.Abp; @@ -32,7 +33,17 @@ namespace EShopOnAbp.IdentityService var hostingEnvironment = context.Services.GetHostingEnvironment(); JwtBearerConfigurationHelper.Configure(context, "IdentityService"); - // SwaggerConfigurationHelper.Configure(context, "Identity Service API"); + + SwaggerWithAuthConfigurationHelper.Configure( + context: context, + authority: configuration["AuthServer:Authority"], + scopes: new Dictionary /* Requested scopes for authorization code request and descriptions for swagger UI only */ + { + {"IdentityService", "Identity Service API"} + }, + apiTitle: "IdentityService Gateway API" + ); + context.Services.AddCors(options => { options.AddDefaultPolicy(builder => @@ -51,16 +62,6 @@ namespace EShopOnAbp.IdentityService .AllowCredentials(); }); }); - - SwaggerWithAuthConfigurationHelper.Configure( - context: context, - authority: configuration["AuthServer:Authority"], - scopes: new Dictionary /* Requested scopes for authorization code request and descriptions for swagger UI only */ - { - {"IdentityService", "Identity Service API"} - }, - apiTitle: "IdentityService Gateway API" - ); } public override void OnApplicationInitialization(ApplicationInitializationContext context) @@ -85,7 +86,10 @@ namespace EShopOnAbp.IdentityService app.UseSwagger(); app.UseSwaggerUI(options => { + var configuration = context.ServiceProvider.GetRequiredService(); options.SwaggerEndpoint("/swagger/v1/swagger.json", "Identity Service API"); + options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); + options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]); }); app.UseAbpSerilogEnrichers(); app.UseAuditing(); diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json index 93d8616f..8f53f8ad 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json @@ -6,7 +6,7 @@ "AuthServer": { "Authority": "https://localhost:44330", "RequireHttpsMetadata": "true", - "SwaggerClientId": "IdentityService_Swagger", + "SwaggerClientId": "WebGateway_Swagger", "SwaggerClientSecret": "1q2w3e*" }, "Logging": { diff --git a/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/appsettings.json b/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/appsettings.json index b83b13d0..c3fabcdc 100644 --- a/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/appsettings.json +++ b/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/appsettings.json @@ -6,7 +6,7 @@ "AuthServer": { "Authority": "https://localhost:44330", "RequireHttpsMetadata": "true", - "SwaggerClientId": "OrderingService_Swagger", + "SwaggerClientId": "WebGateway_Swagger", "SwaggerClientSecret": "1q2w3e*" }, "Logging": { diff --git a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/appsettings.json b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/appsettings.json index acec763a..83d05c81 100644 --- a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/appsettings.json +++ b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/appsettings.json @@ -6,7 +6,7 @@ "AuthServer": { "Authority": "https://localhost:44330", "RequireHttpsMetadata": "true", - "SwaggerClientId": "PaymentService_Swagger", + "SwaggerClientId": "WebGateway_Swagger", "SwaggerClientSecret": "1q2w3e*" }, "Logging": { From ffe15d4adb479d60056fb44e6f7cb26234474110 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 25 Jan 2022 21:05:29 +0300 Subject: [PATCH 3/3] removed unused hosting env variable --- .../IdentityServiceHttpApiHostModule.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/IdentityServiceHttpApiHostModule.cs b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/IdentityServiceHttpApiHostModule.cs index 1c7095d2..984665e7 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/IdentityServiceHttpApiHostModule.cs +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/IdentityServiceHttpApiHostModule.cs @@ -29,7 +29,6 @@ namespace EShopOnAbp.IdentityService public override void ConfigureServices(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); - var hostingEnvironment = context.Services.GetHostingEnvironment(); JwtBearerConfigurationHelper.Configure(context, "IdentityService");