From 73f507f60556407b6c78eb61d2208d9550b8d94b Mon Sep 17 00:00:00 2001 From: Necati Meral Date: Wed, 19 Feb 2020 10:58:36 +0100 Subject: [PATCH 01/10] Updated `HttpAPi.Client` projects to target `netstandard2.0` This makes the usage of clients in traditional .netfx applications (WinForms) possible --- .../src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj | 6 ++---- .../Volo.Abp.Account.HttpApi.Client.csproj | 2 +- .../Volo.Blogging.HttpApi.Client.csproj | 2 +- .../Volo.Docs.HttpApi.Client.csproj | 2 +- .../Volo.Abp.FeatureManagement.HttpApi.Client.csproj | 2 +- .../Volo.Abp.Identity.HttpApi.Client.csproj | 6 ++---- .../Volo.Abp.PermissionManagement.HttpApi.Client.csproj | 2 +- .../Volo.Abp.TenantManagement.HttpApi.Client.csproj | 2 +- 8 files changed, 10 insertions(+), 14 deletions(-) diff --git a/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj b/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj index 461a0c35f5..99f480ee63 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj +++ b/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj @@ -1,18 +1,16 @@ - + - netcoreapp3.1 + netstandard2.0 Volo.Abp.Http.Client Volo.Abp.Http.Client $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; false false false - true - Library diff --git a/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj b/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj index 89679b3e22..aef884dbe2 100644 --- a/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj +++ b/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + netstandard2.0 Volo.Abp.Account.HttpApi.Client Volo.Abp.Account.HttpApi.Client diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj b/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj index 754382f89c..68b3775baa 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + netstandard2.0 Volo.Blogging.HttpApi.Client Volo.Blogging.HttpApi.Client diff --git a/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj b/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj index f527001c45..5df5515e32 100644 --- a/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj +++ b/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + netstandard2.0 Volo.Docs.HttpApi.Client Volo.Docs.HttpApi.Client diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj index 1a784f6e6c..a6dd5772e8 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + netstandard2.0 diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo.Abp.Identity.HttpApi.Client.csproj b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo.Abp.Identity.HttpApi.Client.csproj index 11fd0a40b6..5bff2432a7 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo.Abp.Identity.HttpApi.Client.csproj +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo.Abp.Identity.HttpApi.Client.csproj @@ -1,18 +1,16 @@ - + - netcoreapp3.1 + netstandard2.0 Volo.Abp.Identity.HttpApi.Client Volo.Abp.Identity.HttpApi.Client $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; false false false - Library - true diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo.Abp.PermissionManagement.HttpApi.Client.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo.Abp.PermissionManagement.HttpApi.Client.csproj index 8360442b75..a198deb9eb 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo.Abp.PermissionManagement.HttpApi.Client.csproj +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo.Abp.PermissionManagement.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + netstandard2.0 Volo.Abp.PermissionManagement.HttpApi.Client Volo.Abp.PermissionManagement.HttpApi.Client $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo.Abp.TenantManagement.HttpApi.Client.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo.Abp.TenantManagement.HttpApi.Client.csproj index 9c36b1b29e..263d7b4048 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo.Abp.TenantManagement.HttpApi.Client.csproj +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo.Abp.TenantManagement.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + netstandard2.0 Volo.Abp.TenantManagement.HttpApi.Client Volo.Abp.TenantManagement.HttpApi.Client $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; From 866a5b8b96857322cf40e4ba582ed57625e583fa Mon Sep 17 00:00:00 2001 From: Necati Meral Date: Fri, 21 Feb 2020 10:32:13 +0100 Subject: [PATCH 02/10] Created new framework package `Volo.Abp.Http.Client.IdentityModel.Relay` Package contains the 'pass-through' authenticator-implementation which previously was in `Volo.Abp.Http.Client.IdentityModel.IdentityModelRemoteServiceHttpClientAuthenticator`. Since the `IdentityModelRemoteServiceHttpClientAuthenticator` implementation (without requiring `IHttpContextAccessor`) is required for basic clients (which should be able to target net-standard or netfx) this package was splitted into `Volo.Abp.Http.Client.IdentityModel.Relay` to support the known behavior of just passing the token around. WARNING: This commit contains a breaking change for existing backend applications which use automagic C# clients! --- framework/Volo.Abp.sln | 18 +++++-- .../FodyWeavers.xml | 3 ++ .../FodyWeavers.xsd | 30 ++++++++++++ .../Properties/launchSettings.json | 27 +++++++++++ ...Abp.Http.Client.IdentityModel.Relay.csproj | 23 +++++++++ .../Relay/AbpHttpClientIdentityModelModule.cs | 13 +++++ ...moteServiceHttpClientRelayAuthenticator.cs | 48 +++++++++++++++++++ .../Volo.Abp.Http.Client.IdentityModel.csproj | 6 +-- ...delRemoteServiceHttpClientAuthenticator.cs | 27 +---------- 9 files changed, 160 insertions(+), 35 deletions(-) create mode 100644 framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/FodyWeavers.xml create mode 100644 framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/FodyWeavers.xsd create mode 100644 framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Properties/launchSettings.json create mode 100644 framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo.Abp.Http.Client.IdentityModel.Relay.csproj create mode 100644 framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/AbpHttpClientIdentityModelModule.cs create mode 100644 framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/IdentityModelRemoteServiceHttpClientRelayAuthenticator.cs diff --git a/framework/Volo.Abp.sln b/framework/Volo.Abp.sln index b731aff187..ee45583895 100644 --- a/framework/Volo.Abp.sln +++ b/framework/Volo.Abp.sln @@ -1,4 +1,5 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 + +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.28922.388 MinimumVisualStudioVersion = 10.0.40219.1 @@ -252,13 +253,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.ObjectMapping.Test EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Ddd.Application.Contracts", "src\Volo.Abp.Ddd.Application.Contracts\Volo.Abp.Ddd.Application.Contracts.csproj", "{73559227-EBF0-475F-835B-1FF0CD9132AA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Minify", "src\Volo.Abp.Minify\Volo.Abp.Minify.csproj", "{928DC30D-C078-4BB4-A9F8-FE7252C67DC6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Minify", "src\Volo.Abp.Minify\Volo.Abp.Minify.csproj", "{928DC30D-C078-4BB4-A9F8-FE7252C67DC6}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Minify.Tests", "test\Volo.Abp.Minify.Tests\Volo.Abp.Minify.Tests.csproj", "{E69182B3-350A-43F5-A935-5EBBEBECEF97}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Minify.Tests", "test\Volo.Abp.Minify.Tests\Volo.Abp.Minify.Tests.csproj", "{E69182B3-350A-43F5-A935-5EBBEBECEF97}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Serilog", "src\Volo.Abp.AspNetCore.Serilog\Volo.Abp.AspNetCore.Serilog.csproj", "{3B801003-BE74-49ED-9749-DA5E99F45EBF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Serilog", "src\Volo.Abp.AspNetCore.Serilog\Volo.Abp.AspNetCore.Serilog.csproj", "{3B801003-BE74-49ED-9749-DA5E99F45EBF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Serilog.Tests", "test\Volo.Abp.AspNetCore.Serilog.Tests\Volo.Abp.AspNetCore.Serilog.Tests.csproj", "{9CAA07ED-FE5C-4427-A6FA-6C6CB5B4CC62}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Serilog.Tests", "test\Volo.Abp.AspNetCore.Serilog.Tests\Volo.Abp.AspNetCore.Serilog.Tests.csproj", "{9CAA07ED-FE5C-4427-A6FA-6C6CB5B4CC62}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Http.Client.IdentityModel.Relay", "src\Volo.Abp.Http.Client.IdentityModel.Relay\Volo.Abp.Http.Client.IdentityModel.Relay.csproj", "{925AF101-2203-409C-9C3B-03917316858F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -774,6 +777,10 @@ Global {9CAA07ED-FE5C-4427-A6FA-6C6CB5B4CC62}.Debug|Any CPU.Build.0 = Debug|Any CPU {9CAA07ED-FE5C-4427-A6FA-6C6CB5B4CC62}.Release|Any CPU.ActiveCfg = Release|Any CPU {9CAA07ED-FE5C-4427-A6FA-6C6CB5B4CC62}.Release|Any CPU.Build.0 = Release|Any CPU + {925AF101-2203-409C-9C3B-03917316858F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {925AF101-2203-409C-9C3B-03917316858F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {925AF101-2203-409C-9C3B-03917316858F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {925AF101-2203-409C-9C3B-03917316858F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -906,6 +913,7 @@ Global {E69182B3-350A-43F5-A935-5EBBEBECEF97} = {447C8A77-E5F0-4538-8687-7383196D04EA} {3B801003-BE74-49ED-9749-DA5E99F45EBF} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {9CAA07ED-FE5C-4427-A6FA-6C6CB5B4CC62} = {447C8A77-E5F0-4538-8687-7383196D04EA} + {925AF101-2203-409C-9C3B-03917316858F} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5} diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/FodyWeavers.xml b/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/FodyWeavers.xsd b/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Properties/launchSettings.json b/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Properties/launchSettings.json new file mode 100644 index 0000000000..d56e5c65b7 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:52306/", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "Volo.Abp.Http.Client.IdentityModel": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "http://localhost:52307/" + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo.Abp.Http.Client.IdentityModel.Relay.csproj b/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo.Abp.Http.Client.IdentityModel.Relay.csproj new file mode 100644 index 0000000000..8974420c46 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo.Abp.Http.Client.IdentityModel.Relay.csproj @@ -0,0 +1,23 @@ + + + + + + + netcoreapp3.1 + Volo.Abp.Http.Client.IdentityModel.Relay + Volo.Abp.Http.Client.IdentityModel.Relay + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + false + false + false + true + Library + + + + + + + + diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/AbpHttpClientIdentityModelModule.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/AbpHttpClientIdentityModelModule.cs new file mode 100644 index 0000000000..086d3de06d --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/AbpHttpClientIdentityModelModule.cs @@ -0,0 +1,13 @@ +using Volo.Abp.IdentityModel; +using Volo.Abp.Modularity; + +namespace Volo.Abp.Http.Client.IdentityModel.Relay +{ + [DependsOn( + typeof(AbpHttpClientIdentityModelModule) + )] + public class AbpHttpClientIdentityModelRelayModule : AbpModule + { + + } +} diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/IdentityModelRemoteServiceHttpClientRelayAuthenticator.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/IdentityModelRemoteServiceHttpClientRelayAuthenticator.cs new file mode 100644 index 0000000000..25a1fc771c --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/IdentityModelRemoteServiceHttpClientRelayAuthenticator.cs @@ -0,0 +1,48 @@ +using System.Threading.Tasks; +using IdentityModel.Client; +using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Http; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.Authentication; +using Volo.Abp.IdentityModel; + +namespace Volo.Abp.Http.Client.IdentityModel.Relay +{ + [Dependency(ReplaceServices = true)] + public class IdentityModelRemoteServiceHttpClientRelayAuthenticator : IdentityModelRemoteServiceHttpClientAuthenticator, ITransientDependency + { + public IHttpContextAccessor HttpContextAccessor { get; set; } + + public IdentityModelRemoteServiceHttpClientRelayAuthenticator( + IIdentityModelAuthenticationService identityModelAuthenticationService) + : base(identityModelAuthenticationService) + { + } + + public override async Task Authenticate(RemoteServiceHttpClientAuthenticateContext context) + { + if (context.RemoteService.GetUseCurrentAccessToken() != false) + { + var accessToken = await GetAccessTokenFromHttpContextOrNullAsync(); + if (accessToken != null) + { + context.Request.SetBearerToken(accessToken); + return; + } + } + + await base.Authenticate(context); + } + + protected virtual async Task GetAccessTokenFromHttpContextOrNullAsync() + { + var httpContext = HttpContextAccessor?.HttpContext; + if (httpContext == null) + { + return null; + } + + return await httpContext.GetTokenAsync("access_token"); + } + } +} diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj index e62293964a..d8eef1ba5d 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj @@ -1,18 +1,16 @@ - + - netcoreapp3.1 + netstandard2.0 Volo.Abp.Http.Client.IdentityModel Volo.Abp.Http.Client.IdentityModel $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; false false false - true - Library diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs index 25763efbd5..5d9a85e0c5 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs @@ -1,7 +1,5 @@ using System.Threading.Tasks; using IdentityModel.Client; -using Microsoft.AspNetCore.Authentication; -using Microsoft.AspNetCore.Http; using Volo.Abp.DependencyInjection; using Volo.Abp.Http.Client.Authentication; using Volo.Abp.IdentityModel; @@ -11,8 +9,6 @@ namespace Volo.Abp.Http.Client.IdentityModel [Dependency(ReplaceServices = true)] public class IdentityModelRemoteServiceHttpClientAuthenticator : IRemoteServiceHttpClientAuthenticator, ITransientDependency { - public IHttpContextAccessor HttpContextAccessor { get; set; } - protected IIdentityModelAuthenticationService IdentityModelAuthenticationService { get; } public IdentityModelRemoteServiceHttpClientAuthenticator( @@ -21,33 +17,12 @@ namespace Volo.Abp.Http.Client.IdentityModel IdentityModelAuthenticationService = identityModelAuthenticationService; } - public async Task Authenticate(RemoteServiceHttpClientAuthenticateContext context) + public virtual async Task Authenticate(RemoteServiceHttpClientAuthenticateContext context) { - if (context.RemoteService.GetUseCurrentAccessToken() != false) - { - var accessToken = await GetAccessTokenFromHttpContextOrNullAsync(); - if (accessToken != null) - { - context.Request.SetBearerToken(accessToken); - return; - } - } - await IdentityModelAuthenticationService.TryAuthenticateAsync( context.Client, context.RemoteService.GetIdentityClient() ); } - - protected virtual async Task GetAccessTokenFromHttpContextOrNullAsync() - { - var httpContext = HttpContextAccessor?.HttpContext; - if (httpContext == null) - { - return null; - } - - return await httpContext.GetTokenAsync("access_token"); - } } } From 75bb5d645327a839af9fb6285d7a195d84339b3c Mon Sep 17 00:00:00 2001 From: Necati Meral Date: Fri, 21 Feb 2020 16:01:26 +0100 Subject: [PATCH 03/10] Implemented `IParameterTypeComparer` to be used in `ApiDescriptionFinder` The `CrossPlatformParameterTypeComparer` handles type differences in .net-core and .net-framework by replacing the assembly names with placeholders. This implementation works in all environments because the `CrossPlatformParameterTypeComparer` inherits the default behavior and (once) checks the current framework. --- .../DynamicProxying/ApiDescriptionFinder.cs | 10 +++-- .../CrossPlatformParameterTypeComparer.cs | 43 ++++++++++++++++++ .../DynamicProxying/EnvironmentHelper.cs | 44 +++++++++++++++++++ .../DynamicProxying/IParameterTypeComparer.cs | 19 ++++++++ .../DynamicProxying/ParameterTypeComparer.cs | 16 +++++++ 5 files changed, 129 insertions(+), 3 deletions(-) create mode 100644 framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/CrossPlatformParameterTypeComparer.cs create mode 100644 framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/EnvironmentHelper.cs create mode 100644 framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IParameterTypeComparer.cs create mode 100644 framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ParameterTypeComparer.cs diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs index 9b9c8e804c..6f8b5da376 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs @@ -18,17 +18,21 @@ namespace Volo.Abp.Http.Client.DynamicProxying protected IApiDescriptionCache Cache { get; } + protected IParameterTypeComparer ParameterTypeComparer { get; } + private static readonly JsonSerializerSettings SharedJsonSerializerSettings = new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }; public ApiDescriptionFinder( - IApiDescriptionCache cache, - IDynamicProxyHttpClientFactory httpClientFactory) + IApiDescriptionCache cache, + IDynamicProxyHttpClientFactory httpClientFactory, + IParameterTypeComparer parameterTypeComparer) { Cache = cache; HttpClientFactory = httpClientFactory; + ParameterTypeComparer = parameterTypeComparer; CancellationTokenProvider = NullCancellationTokenProvider.Instance; } @@ -57,7 +61,7 @@ namespace Volo.Abp.Http.Client.DynamicProxying for (int i = 0; i < methodParameters.Length; i++) { - if (action.ParametersOnMethod[i].TypeAsString != methodParameters[i].ParameterType.GetFullNameWithAssemblyName()) + if (!ParameterTypeComparer.TypeMatches(action.ParametersOnMethod[i], methodParameters[i])) { found = false; break; diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/CrossPlatformParameterTypeComparer.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/CrossPlatformParameterTypeComparer.cs new file mode 100644 index 0000000000..e9142ffe3f --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/CrossPlatformParameterTypeComparer.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Modeling; + +namespace Volo.Abp.Http.Client.DynamicProxying +{ + /// + /// Compares the server-side parameter-type with the local parameter-type considering differences between + /// the .net-core and the traditional .net-framework. + /// Inspired by 'https://github.com/akkadotnet/akka.net/pull/2947/files' + /// + public class CrossPlatformParameterTypeComparer : ParameterTypeComparer, ITransientDependency + { + const string Placeholder = "%COREFX%"; + const string NetCoreLib = "System.Private.CoreLib"; + const string NetFxLib = "mscorlib"; + + static readonly bool runsOnNetFx; + + static CrossPlatformParameterTypeComparer() + { + runsOnNetFx = string.IsNullOrEmpty(EnvironmentHelper.RuntimeNetCoreVersion); + } + + public override bool TypeMatches(MethodParameterApiDescriptionModel actionParameter, ParameterInfo methodParameter) + { + if (runsOnNetFx) + { + // Compare the server's DotnetCore type relative to the current, traditional framework type + // by replacing framework assemblies with an placeholder string. + return actionParameter.TypeAsString.Replace(NetCoreLib, Placeholder) + == methodParameter.ParameterType.GetFullNameWithAssemblyName().Replace(NetFxLib, Placeholder); + } + else + { + return base.TypeMatches(actionParameter, methodParameter); + } + } + } +} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/EnvironmentHelper.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/EnvironmentHelper.cs new file mode 100644 index 0000000000..0ed914e419 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/EnvironmentHelper.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text; + +namespace Volo.Abp.Http.Client.DynamicProxying +{ + /// + /// Provide helpers to check the environment where the current ABP app is currently running + /// + static class EnvironmentHelper + { + /// + /// Initializes the class. + /// + static EnvironmentHelper() + { + RuntimeNetCoreVersion = GetNetCoreVersion(); + } + + /// + /// Gets the runtime net core version. + /// + /// + /// If the is null the app is running on a .net Classic environment + /// + public static string RuntimeNetCoreVersion { get; } + + /// + /// Gets the net core version. + /// + static string GetNetCoreVersion() + { + var assembly = typeof(System.Runtime.GCSettings).GetTypeInfo().Assembly; + var assemblyPath = assembly.CodeBase.Split(new[] { '/', '\\' }, StringSplitOptions.RemoveEmptyEntries); + int netCoreAppIndex = Array.IndexOf(assemblyPath, "Microsoft.NETCore.App"); + if (netCoreAppIndex > 0 && netCoreAppIndex < assemblyPath.Length - 2) + { + return assemblyPath[netCoreAppIndex + 1]; + } + return null; + } + } +} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IParameterTypeComparer.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IParameterTypeComparer.cs new file mode 100644 index 0000000000..079029bf93 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IParameterTypeComparer.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text; +using Volo.Abp.Http.Modeling; + +namespace Volo.Abp.Http.Client.DynamicProxying +{ + public interface IParameterTypeComparer + { + /// + /// Compares the given parameters. + /// + /// The parameter description retreived from the server (depends on the server's runtime) + /// The local parameter info (depends on the client's runtime) + /// + public bool TypeMatches(MethodParameterApiDescriptionModel actionParameter, ParameterInfo methodParameter); + } +} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ParameterTypeComparer.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ParameterTypeComparer.cs new file mode 100644 index 0000000000..6551ba3108 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ParameterTypeComparer.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text; +using Volo.Abp.Http.Modeling; + +namespace Volo.Abp.Http.Client.DynamicProxying +{ + public class ParameterTypeComparer : IParameterTypeComparer + { + public virtual bool TypeMatches(MethodParameterApiDescriptionModel actionParameter, ParameterInfo methodParameter) + { + return actionParameter.TypeAsString == methodParameter.ParameterType.GetFullNameWithAssemblyName(); + } + } +} From 5c472108ca313be56be6007ee2725166252a7651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 2 Mar 2020 17:18:45 +0300 Subject: [PATCH 04/10] Remove unused namespaces --- .../CrossPlatformParameterTypeComparer.cs | 2 -- .../Client/DynamicProxying/IParameterTypeComparer.cs | 9 +++------ .../Http/Client/DynamicProxying/ParameterTypeComparer.cs | 2 -- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/CrossPlatformParameterTypeComparer.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/CrossPlatformParameterTypeComparer.cs index e9142ffe3f..d6f3b3d1ec 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/CrossPlatformParameterTypeComparer.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/CrossPlatformParameterTypeComparer.cs @@ -1,7 +1,5 @@ using System; -using System.Collections.Generic; using System.Reflection; -using System.Text; using Volo.Abp.DependencyInjection; using Volo.Abp.Http.Modeling; diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IParameterTypeComparer.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IParameterTypeComparer.cs index 079029bf93..2aed060b01 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IParameterTypeComparer.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IParameterTypeComparer.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Text; +using System.Reflection; using Volo.Abp.Http.Modeling; namespace Volo.Abp.Http.Client.DynamicProxying @@ -11,9 +8,9 @@ namespace Volo.Abp.Http.Client.DynamicProxying /// /// Compares the given parameters. /// - /// The parameter description retreived from the server (depends on the server's runtime) + /// The parameter description retrieved from the server (depends on the server's runtime) /// The local parameter info (depends on the client's runtime) /// - public bool TypeMatches(MethodParameterApiDescriptionModel actionParameter, ParameterInfo methodParameter); + bool TypeMatches(MethodParameterApiDescriptionModel actionParameter, ParameterInfo methodParameter); } } diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ParameterTypeComparer.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ParameterTypeComparer.cs index 6551ba3108..cb714fd5aa 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ParameterTypeComparer.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ParameterTypeComparer.cs @@ -1,7 +1,5 @@ using System; -using System.Collections.Generic; using System.Reflection; -using System.Text; using Volo.Abp.Http.Modeling; namespace Volo.Abp.Http.Client.DynamicProxying From af720277e78107773e5fc0709a9f3b4f839bf1e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 2 Mar 2020 17:30:09 +0300 Subject: [PATCH 05/10] Remove EnvironmentHelper and IParameterTypeComparer. --- .../DynamicProxying/ApiDescriptionFinder.cs | 23 +++++++--- .../CrossPlatformParameterTypeComparer.cs | 41 ----------------- .../DynamicProxying/EnvironmentHelper.cs | 44 ------------------- .../DynamicProxying/IParameterTypeComparer.cs | 16 ------- .../DynamicProxying/ParameterTypeComparer.cs | 14 ------ 5 files changed, 17 insertions(+), 121 deletions(-) delete mode 100644 framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/CrossPlatformParameterTypeComparer.cs delete mode 100644 framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/EnvironmentHelper.cs delete mode 100644 framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IParameterTypeComparer.cs delete mode 100644 framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ParameterTypeComparer.cs diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs index 6f8b5da376..38e6878bed 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs @@ -18,8 +18,6 @@ namespace Volo.Abp.Http.Client.DynamicProxying protected IApiDescriptionCache Cache { get; } - protected IParameterTypeComparer ParameterTypeComparer { get; } - private static readonly JsonSerializerSettings SharedJsonSerializerSettings = new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() @@ -27,12 +25,10 @@ namespace Volo.Abp.Http.Client.DynamicProxying public ApiDescriptionFinder( IApiDescriptionCache cache, - IDynamicProxyHttpClientFactory httpClientFactory, - IParameterTypeComparer parameterTypeComparer) + IDynamicProxyHttpClientFactory httpClientFactory) { Cache = cache; HttpClientFactory = httpClientFactory; - ParameterTypeComparer = parameterTypeComparer; CancellationTokenProvider = NullCancellationTokenProvider.Instance; } @@ -61,7 +57,7 @@ namespace Volo.Abp.Http.Client.DynamicProxying for (int i = 0; i < methodParameters.Length; i++) { - if (!ParameterTypeComparer.TypeMatches(action.ParametersOnMethod[i], methodParameters[i])) + if (!TypeMatches(action.ParametersOnMethod[i], methodParameters[i])) { found = false; break; @@ -108,5 +104,20 @@ namespace Volo.Abp.Http.Client.DynamicProxying return (ApplicationApiDescriptionModel)result; } } + + protected virtual bool TypeMatches(MethodParameterApiDescriptionModel actionParameter, ParameterInfo methodParameter) + { + return NormalizeTypeName(actionParameter.TypeAsString) == + NormalizeTypeName(methodParameter.ParameterType.GetFullNameWithAssemblyName()); + } + + protected virtual string NormalizeTypeName(string typeName) + { + const string placeholder = "%COREFX%"; + const string netCoreLib = "System.Private.CoreLib"; + const string netFxLib = "mscorlib"; + + return typeName.Replace(netCoreLib, placeholder).Replace(netFxLib, placeholder); + } } } diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/CrossPlatformParameterTypeComparer.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/CrossPlatformParameterTypeComparer.cs deleted file mode 100644 index d6f3b3d1ec..0000000000 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/CrossPlatformParameterTypeComparer.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Reflection; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Http.Modeling; - -namespace Volo.Abp.Http.Client.DynamicProxying -{ - /// - /// Compares the server-side parameter-type with the local parameter-type considering differences between - /// the .net-core and the traditional .net-framework. - /// Inspired by 'https://github.com/akkadotnet/akka.net/pull/2947/files' - /// - public class CrossPlatformParameterTypeComparer : ParameterTypeComparer, ITransientDependency - { - const string Placeholder = "%COREFX%"; - const string NetCoreLib = "System.Private.CoreLib"; - const string NetFxLib = "mscorlib"; - - static readonly bool runsOnNetFx; - - static CrossPlatformParameterTypeComparer() - { - runsOnNetFx = string.IsNullOrEmpty(EnvironmentHelper.RuntimeNetCoreVersion); - } - - public override bool TypeMatches(MethodParameterApiDescriptionModel actionParameter, ParameterInfo methodParameter) - { - if (runsOnNetFx) - { - // Compare the server's DotnetCore type relative to the current, traditional framework type - // by replacing framework assemblies with an placeholder string. - return actionParameter.TypeAsString.Replace(NetCoreLib, Placeholder) - == methodParameter.ParameterType.GetFullNameWithAssemblyName().Replace(NetFxLib, Placeholder); - } - else - { - return base.TypeMatches(actionParameter, methodParameter); - } - } - } -} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/EnvironmentHelper.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/EnvironmentHelper.cs deleted file mode 100644 index 0ed914e419..0000000000 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/EnvironmentHelper.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Text; - -namespace Volo.Abp.Http.Client.DynamicProxying -{ - /// - /// Provide helpers to check the environment where the current ABP app is currently running - /// - static class EnvironmentHelper - { - /// - /// Initializes the class. - /// - static EnvironmentHelper() - { - RuntimeNetCoreVersion = GetNetCoreVersion(); - } - - /// - /// Gets the runtime net core version. - /// - /// - /// If the is null the app is running on a .net Classic environment - /// - public static string RuntimeNetCoreVersion { get; } - - /// - /// Gets the net core version. - /// - static string GetNetCoreVersion() - { - var assembly = typeof(System.Runtime.GCSettings).GetTypeInfo().Assembly; - var assemblyPath = assembly.CodeBase.Split(new[] { '/', '\\' }, StringSplitOptions.RemoveEmptyEntries); - int netCoreAppIndex = Array.IndexOf(assemblyPath, "Microsoft.NETCore.App"); - if (netCoreAppIndex > 0 && netCoreAppIndex < assemblyPath.Length - 2) - { - return assemblyPath[netCoreAppIndex + 1]; - } - return null; - } - } -} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IParameterTypeComparer.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IParameterTypeComparer.cs deleted file mode 100644 index 2aed060b01..0000000000 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IParameterTypeComparer.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Reflection; -using Volo.Abp.Http.Modeling; - -namespace Volo.Abp.Http.Client.DynamicProxying -{ - public interface IParameterTypeComparer - { - /// - /// Compares the given parameters. - /// - /// The parameter description retrieved from the server (depends on the server's runtime) - /// The local parameter info (depends on the client's runtime) - /// - bool TypeMatches(MethodParameterApiDescriptionModel actionParameter, ParameterInfo methodParameter); - } -} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ParameterTypeComparer.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ParameterTypeComparer.cs deleted file mode 100644 index cb714fd5aa..0000000000 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ParameterTypeComparer.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Reflection; -using Volo.Abp.Http.Modeling; - -namespace Volo.Abp.Http.Client.DynamicProxying -{ - public class ParameterTypeComparer : IParameterTypeComparer - { - public virtual bool TypeMatches(MethodParameterApiDescriptionModel actionParameter, ParameterInfo methodParameter) - { - return actionParameter.TypeAsString == methodParameter.ParameterType.GetFullNameWithAssemblyName(); - } - } -} From 23e6018278188b7d509b298a1f6b52766324a4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 3 Mar 2020 11:01:40 +0300 Subject: [PATCH 06/10] Renamed Volo.Abp.Http.Client.IdentityModel.Relay to Volo.Abp.Http.Client.IdentityModel.Web. Also fixed depending projects. --- framework/Volo.Abp.sln | 15 ++++++++--- .../Relay/AbpHttpClientIdentityModelModule.cs | 13 ---------- .../FodyWeavers.xml | 0 .../FodyWeavers.xsd | 0 .../Properties/launchSettings.json | 0 ....Abp.Http.Client.IdentityModel.Web.csproj} | 4 +-- .../AbpHttpClientIdentityModelWebModule.cs | 12 +++++++++ ...elRemoteServiceHttpClientAuthenticator.cs} | 6 ++--- ...delRemoteServiceHttpClientAuthenticator.cs | 1 - .../IdentityModel/AbpIdentityModelModule.cs | 2 ++ ...Http.Client.IdentityModel.Web.Tests.csproj | 16 ++++++++++++ ...AbpHttpClientIdentityModelWebTestModule.cs | 10 +++++++ ...oteServiceHttpClientAuthenticator_Tests.cs | 26 +++++++++++++++++++ .../ClientSimulationWebModule.cs | 2 ++ .../Volo.ClientSimulation.Web.csproj | 1 + nupkg/common.ps1 | 1 + ...e.BookStore.BookManagement.Web.Host.csproj | 2 +- .../BookManagementWebHostModule.cs | 3 ++- ...ement.HttpApi.Client.ConsoleTestApp.csproj | 4 +++ ...Store.HttpApi.Client.ConsoleTestApp.csproj | 4 +++ ...yCompanyName.MyProjectName.Web.Host.csproj | 2 +- .../MyProjectNameWebModule.cs | 4 +-- ...tName.HttpApi.Client.ConsoleTestApp.csproj | 4 +++ 23 files changed, 104 insertions(+), 28 deletions(-) delete mode 100644 framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/AbpHttpClientIdentityModelModule.cs rename framework/src/{Volo.Abp.Http.Client.IdentityModel.Relay => Volo.Abp.Http.Client.IdentityModel.Web}/FodyWeavers.xml (100%) rename framework/src/{Volo.Abp.Http.Client.IdentityModel.Relay => Volo.Abp.Http.Client.IdentityModel.Web}/FodyWeavers.xsd (100%) rename framework/src/{Volo.Abp.Http.Client.IdentityModel.Relay => Volo.Abp.Http.Client.IdentityModel.Web}/Properties/launchSettings.json (100%) rename framework/src/{Volo.Abp.Http.Client.IdentityModel.Relay/Volo.Abp.Http.Client.IdentityModel.Relay.csproj => Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj} (85%) create mode 100644 framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo/Abp/Http/Client/IdentityModel/Web/AbpHttpClientIdentityModelWebModule.cs rename framework/src/{Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/IdentityModelRemoteServiceHttpClientRelayAuthenticator.cs => Volo.Abp.Http.Client.IdentityModel.Web/Volo/Abp/Http/Client/IdentityModel/Web/HttpContextIdentityModelRemoteServiceHttpClientAuthenticator.cs} (83%) create mode 100644 framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo.Abp.Http.Client.IdentityModel.Web.Tests.csproj create mode 100644 framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo/Abp/Http/Client/IdentityModel/Web/AbpHttpClientIdentityModelWebTestModule.cs create mode 100644 framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo/Abp/Http/Client/IdentityModel/Web/HttpContextIdentityModelRemoteServiceHttpClientAuthenticator_Tests.cs diff --git a/framework/Volo.Abp.sln b/framework/Volo.Abp.sln index b2fb0c2336..88c8385b63 100644 --- a/framework/Volo.Abp.sln +++ b/framework/Volo.Abp.sln @@ -261,17 +261,19 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Serilog EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Serilog.Tests", "test\Volo.Abp.AspNetCore.Serilog.Tests\Volo.Abp.AspNetCore.Serilog.Tests.csproj", "{9CAA07ED-FE5C-4427-A6FA-6C6CB5B4CC62}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Http.Client.IdentityModel.Relay", "src\Volo.Abp.Http.Client.IdentityModel.Relay\Volo.Abp.Http.Client.IdentityModel.Relay.csproj", "{925AF101-2203-409C-9C3B-03917316858F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Http.Client.IdentityModel.Web", "src\Volo.Abp.Http.Client.IdentityModel.Web\Volo.Abp.Http.Client.IdentityModel.Web.csproj", "{925AF101-2203-409C-9C3B-03917316858F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.BackgroundJobs.Quartz", "src\Volo.Abp.BackgroundJobs.Quartz\Volo.Abp.BackgroundJobs.Quartz.csproj", "{2307198B-5837-4F05-AA84-D6EC2A923D69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Quartz", "src\Volo.Abp.Quartz\Volo.Abp.Quartz.csproj", "{9467418B-4A9B-4093-9B31-01A9DEF5B372}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.BackgroundWorkers.Quartz", "src\Volo.Abp.BackgroundWorkers.Quartz\Volo.Abp.BackgroundWorkers.Quartz.csproj", "{CD5770BB-2E0C-4B3C-80E0-21B8CC43DBA9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.BackgroundWorkers.Quartz", "src\Volo.Abp.BackgroundWorkers.Quartz\Volo.Abp.BackgroundWorkers.Quartz.csproj", "{CD5770BB-2E0C-4B3C-80E0-21B8CC43DBA9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo", "src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj", "{29E42ADB-85F8-44AE-A9B0-078F84C1B866}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo", "src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj", "{29E42ADB-85F8-44AE-A9B0-078F84C1B866}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo", "test\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.csproj", "{0C498CF2-D052-4BF7-AD35-509A90F69707}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo", "test\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.csproj", "{0C498CF2-D052-4BF7-AD35-509A90F69707}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Http.Client.IdentityModel.Web.Tests", "test\Volo.Abp.Http.Client.IdentityModel.Web.Tests\Volo.Abp.Http.Client.IdentityModel.Web.Tests.csproj", "{E1963439-2BE5-4DB5-8438-2A9A792A1ADA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -811,6 +813,10 @@ Global {0C498CF2-D052-4BF7-AD35-509A90F69707}.Debug|Any CPU.Build.0 = Debug|Any CPU {0C498CF2-D052-4BF7-AD35-509A90F69707}.Release|Any CPU.ActiveCfg = Release|Any CPU {0C498CF2-D052-4BF7-AD35-509A90F69707}.Release|Any CPU.Build.0 = Release|Any CPU + {E1963439-2BE5-4DB5-8438-2A9A792A1ADA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E1963439-2BE5-4DB5-8438-2A9A792A1ADA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1963439-2BE5-4DB5-8438-2A9A792A1ADA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E1963439-2BE5-4DB5-8438-2A9A792A1ADA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -949,6 +955,7 @@ Global {CD5770BB-2E0C-4B3C-80E0-21B8CC43DBA9} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {29E42ADB-85F8-44AE-A9B0-078F84C1B866} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {0C498CF2-D052-4BF7-AD35-509A90F69707} = {447C8A77-E5F0-4538-8687-7383196D04EA} + {E1963439-2BE5-4DB5-8438-2A9A792A1ADA} = {447C8A77-E5F0-4538-8687-7383196D04EA} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5} diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/AbpHttpClientIdentityModelModule.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/AbpHttpClientIdentityModelModule.cs deleted file mode 100644 index 086d3de06d..0000000000 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/AbpHttpClientIdentityModelModule.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Volo.Abp.IdentityModel; -using Volo.Abp.Modularity; - -namespace Volo.Abp.Http.Client.IdentityModel.Relay -{ - [DependsOn( - typeof(AbpHttpClientIdentityModelModule) - )] - public class AbpHttpClientIdentityModelRelayModule : AbpModule - { - - } -} diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/FodyWeavers.xml b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/FodyWeavers.xml similarity index 100% rename from framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/FodyWeavers.xml rename to framework/src/Volo.Abp.Http.Client.IdentityModel.Web/FodyWeavers.xml diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/FodyWeavers.xsd b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/FodyWeavers.xsd similarity index 100% rename from framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/FodyWeavers.xsd rename to framework/src/Volo.Abp.Http.Client.IdentityModel.Web/FodyWeavers.xsd diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Properties/launchSettings.json b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Properties/launchSettings.json similarity index 100% rename from framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Properties/launchSettings.json rename to framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Properties/launchSettings.json diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo.Abp.Http.Client.IdentityModel.Relay.csproj b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj similarity index 85% rename from framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo.Abp.Http.Client.IdentityModel.Relay.csproj rename to framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj index 8974420c46..1518da9045 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo.Abp.Http.Client.IdentityModel.Relay.csproj +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj @@ -5,8 +5,8 @@ netcoreapp3.1 - Volo.Abp.Http.Client.IdentityModel.Relay - Volo.Abp.Http.Client.IdentityModel.Relay + Volo.Abp.Http.Client.IdentityModel.Web + Volo.Abp.Http.Client.IdentityModel.Web $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; false false diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo/Abp/Http/Client/IdentityModel/Web/AbpHttpClientIdentityModelWebModule.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo/Abp/Http/Client/IdentityModel/Web/AbpHttpClientIdentityModelWebModule.cs new file mode 100644 index 0000000000..bdb216e41c --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo/Abp/Http/Client/IdentityModel/Web/AbpHttpClientIdentityModelWebModule.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Modularity; + +namespace Volo.Abp.Http.Client.IdentityModel.Web +{ + [DependsOn( + typeof(AbpHttpClientIdentityModelModule) + )] + public class AbpHttpClientIdentityModelWebModule : AbpModule + { + + } +} diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/IdentityModelRemoteServiceHttpClientRelayAuthenticator.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo/Abp/Http/Client/IdentityModel/Web/HttpContextIdentityModelRemoteServiceHttpClientAuthenticator.cs similarity index 83% rename from framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/IdentityModelRemoteServiceHttpClientRelayAuthenticator.cs rename to framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo/Abp/Http/Client/IdentityModel/Web/HttpContextIdentityModelRemoteServiceHttpClientAuthenticator.cs index 25a1fc771c..a829a630d6 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.Relay/Volo/Abp/Http/Client/IdentityModel/Relay/IdentityModelRemoteServiceHttpClientRelayAuthenticator.cs +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo/Abp/Http/Client/IdentityModel/Web/HttpContextIdentityModelRemoteServiceHttpClientAuthenticator.cs @@ -6,14 +6,14 @@ using Volo.Abp.DependencyInjection; using Volo.Abp.Http.Client.Authentication; using Volo.Abp.IdentityModel; -namespace Volo.Abp.Http.Client.IdentityModel.Relay +namespace Volo.Abp.Http.Client.IdentityModel.Web { [Dependency(ReplaceServices = true)] - public class IdentityModelRemoteServiceHttpClientRelayAuthenticator : IdentityModelRemoteServiceHttpClientAuthenticator, ITransientDependency + public class HttpContextIdentityModelRemoteServiceHttpClientAuthenticator : IdentityModelRemoteServiceHttpClientAuthenticator { public IHttpContextAccessor HttpContextAccessor { get; set; } - public IdentityModelRemoteServiceHttpClientRelayAuthenticator( + public HttpContextIdentityModelRemoteServiceHttpClientAuthenticator( IIdentityModelAuthenticationService identityModelAuthenticationService) : base(identityModelAuthenticationService) { diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs index 5d9a85e0c5..0b1749f445 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs @@ -1,5 +1,4 @@ using System.Threading.Tasks; -using IdentityModel.Client; using Volo.Abp.DependencyInjection; using Volo.Abp.Http.Client.Authentication; using Volo.Abp.IdentityModel; diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityModelModule.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityModelModule.cs index b26b545fec..d0a08707b5 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityModelModule.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityModelModule.cs @@ -13,6 +13,8 @@ namespace Volo.Abp.IdentityModel { var configuration = context.Services.GetConfiguration(); + context.Services.AddHttpClient(); + Configure(configuration); } } diff --git a/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo.Abp.Http.Client.IdentityModel.Web.Tests.csproj b/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo.Abp.Http.Client.IdentityModel.Web.Tests.csproj new file mode 100644 index 0000000000..704c3b57aa --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo.Abp.Http.Client.IdentityModel.Web.Tests.csproj @@ -0,0 +1,16 @@ + + + + + + netcoreapp3.1 + + + + + + + + + + diff --git a/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo/Abp/Http/Client/IdentityModel/Web/AbpHttpClientIdentityModelWebTestModule.cs b/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo/Abp/Http/Client/IdentityModel/Web/AbpHttpClientIdentityModelWebTestModule.cs new file mode 100644 index 0000000000..afd46d8d1c --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo/Abp/Http/Client/IdentityModel/Web/AbpHttpClientIdentityModelWebTestModule.cs @@ -0,0 +1,10 @@ +using Volo.Abp.Modularity; + +namespace Volo.Abp.Http.Client.IdentityModel.Web.Tests +{ + [DependsOn(typeof(AbpHttpClientIdentityModelWebModule))] + public class AbpHttpClientIdentityModelWebTestModule : AbpModule + { + + } +} diff --git a/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo/Abp/Http/Client/IdentityModel/Web/HttpContextIdentityModelRemoteServiceHttpClientAuthenticator_Tests.cs b/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo/Abp/Http/Client/IdentityModel/Web/HttpContextIdentityModelRemoteServiceHttpClientAuthenticator_Tests.cs new file mode 100644 index 0000000000..63da9ae62a --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo/Abp/Http/Client/IdentityModel/Web/HttpContextIdentityModelRemoteServiceHttpClientAuthenticator_Tests.cs @@ -0,0 +1,26 @@ +using Shouldly; +using Volo.Abp.DynamicProxy; +using Volo.Abp.Http.Client.Authentication; +using Volo.Abp.Http.Client.IdentityModel.Web.Tests; +using Volo.Abp.Testing; +using Xunit; + +namespace Volo.Abp.Http.Client.IdentityModel.Web +{ + public class HttpContextIdentityModelRemoteServiceHttpClientAuthenticator_Tests : AbpIntegratedTest + { + private readonly IRemoteServiceHttpClientAuthenticator _remoteServiceHttpClientAuthenticator; + + public HttpContextIdentityModelRemoteServiceHttpClientAuthenticator_Tests() + { + _remoteServiceHttpClientAuthenticator = GetRequiredService(); + } + + [Fact] + public void Implementation_Should_Be_Type_Of_HttpContextIdentityModelRemoteServiceHttpClientAuthenticator() + { + ProxyHelper.UnProxy(_remoteServiceHttpClientAuthenticator) + .ShouldBeOfType(typeof(HttpContextIdentityModelRemoteServiceHttpClientAuthenticator)); + } + } +} diff --git a/modules/client-simulation/src/Volo.ClientSimulation.Web/ClientSimulationWebModule.cs b/modules/client-simulation/src/Volo.ClientSimulation.Web/ClientSimulationWebModule.cs index c75ee14656..8cdc7809ab 100644 --- a/modules/client-simulation/src/Volo.ClientSimulation.Web/ClientSimulationWebModule.cs +++ b/modules/client-simulation/src/Volo.ClientSimulation.Web/ClientSimulationWebModule.cs @@ -1,4 +1,5 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; +using Volo.Abp.Http.Client.IdentityModel.Web; using Volo.Abp.Modularity; using Volo.Abp.VirtualFileSystem; @@ -6,6 +7,7 @@ namespace Volo.ClientSimulation { [DependsOn( typeof(ClientSimulationModule), + typeof(AbpHttpClientIdentityModelWebModule), typeof(AbpAspNetCoreMvcUiThemeSharedModule) )] public class ClientSimulationWebModule : AbpModule diff --git a/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj b/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj index ad0ce496f5..57b87b9e72 100644 --- a/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj +++ b/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj @@ -15,6 +15,7 @@ + diff --git a/nupkg/common.ps1 b/nupkg/common.ps1 index 812f822108..52c2a54464 100644 --- a/nupkg/common.ps1 +++ b/nupkg/common.ps1 @@ -81,6 +81,7 @@ $projects = ( "framework/src/Volo.Abp.Http.Client.IdentityModel", "framework/src/Volo.Abp.Http", "framework/src/Volo.Abp.IdentityModel", + "framework/src/Volo.Abp.IdentityModel.Web", "framework/src/Volo.Abp.Json", "framework/src/Volo.Abp.Ldap", "framework/src/Volo.Abp.Localization.Abstractions", diff --git a/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/Acme.BookStore.BookManagement.Web.Host.csproj b/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/Acme.BookStore.BookManagement.Web.Host.csproj index 34f8bcf4c1..d2022bb48f 100644 --- a/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/Acme.BookStore.BookManagement.Web.Host.csproj +++ b/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/Acme.BookStore.BookManagement.Web.Host.csproj @@ -19,7 +19,7 @@ - + diff --git a/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/BookManagementWebHostModule.cs b/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/BookManagementWebHostModule.cs index da1a8dc2fb..9e7c7db897 100644 --- a/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/BookManagementWebHostModule.cs +++ b/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/BookManagementWebHostModule.cs @@ -26,6 +26,7 @@ using Volo.Abp.Autofac; using Volo.Abp.AutoMapper; using Volo.Abp.Caching; using Volo.Abp.Http.Client.IdentityModel; +using Volo.Abp.Http.Client.IdentityModel.Web; using Volo.Abp.Identity; using Volo.Abp.Identity.Web; using Volo.Abp.Modularity; @@ -48,7 +49,7 @@ namespace Acme.BookStore.BookManagement typeof(AbpAspNetCoreMvcClientModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule), typeof(AbpAutofacModule), - typeof(AbpHttpClientIdentityModelModule), + typeof(AbpHttpClientIdentityModelWebModule), typeof(AbpIdentityWebModule), typeof(AbpIdentityHttpApiClientModule), typeof(AbpTenantManagementWebModule), diff --git a/samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp.csproj b/samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp.csproj index 463c12d939..9e02f60d52 100644 --- a/samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp.csproj +++ b/samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp.csproj @@ -19,4 +19,8 @@ + + + + diff --git a/samples/BookStore/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj b/samples/BookStore/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj index c4387a063f..dcc021eee6 100644 --- a/samples/BookStore/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj +++ b/samples/BookStore/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj @@ -21,4 +21,8 @@ + + + + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj index 697cbe1b44..ae37bbd5a1 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj @@ -31,7 +31,7 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs index d2b050644f..102ff5eee9 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs @@ -27,7 +27,7 @@ using Volo.Abp.Autofac; using Volo.Abp.AutoMapper; using Volo.Abp.Caching; using Volo.Abp.FeatureManagement; -using Volo.Abp.Http.Client.IdentityModel; +using Volo.Abp.Http.Client.IdentityModel.Web; using Volo.Abp.Identity.Web; using Volo.Abp.Modularity; using Volo.Abp.MultiTenancy; @@ -48,7 +48,7 @@ namespace MyCompanyName.MyProjectName.Web typeof(AbpAspNetCoreMvcUiBasicThemeModule), typeof(AbpAutofacModule), typeof(AbpFeatureManagementWebModule), - typeof(AbpHttpClientIdentityModelModule), + typeof(AbpHttpClientIdentityModelWebModule), typeof(AbpIdentityWebModule), typeof(AbpTenantManagementWebModule), typeof(AbpAspNetCoreSerilogModule) diff --git a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj index a70855393d..571b6a2d30 100644 --- a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj +++ b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj @@ -20,5 +20,9 @@ + + + + From e46632e98fff780883483b0343d5faa8b274b64e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 3 Mar 2020 11:39:33 +0300 Subject: [PATCH 07/10] Add Microsoft.Extensions.Hosting to the console apps. --- .../Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj | 4 ++++ .../Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj | 4 ++++ .../DashboardDemo.HttpApi.Client.ConsoleTestApp.csproj | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj b/samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj index af90ca7a55..7c32b6f914 100644 --- a/samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj +++ b/samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj @@ -20,5 +20,9 @@ + + + + diff --git a/samples/BookStore-Modular/application/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj b/samples/BookStore-Modular/application/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj index af90ca7a55..7c32b6f914 100644 --- a/samples/BookStore-Modular/application/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj +++ b/samples/BookStore-Modular/application/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj @@ -20,5 +20,9 @@ + + + + diff --git a/samples/DashboardDemo/test/DashboardDemo.HttpApi.Client.ConsoleTestApp/DashboardDemo.HttpApi.Client.ConsoleTestApp.csproj b/samples/DashboardDemo/test/DashboardDemo.HttpApi.Client.ConsoleTestApp/DashboardDemo.HttpApi.Client.ConsoleTestApp.csproj index ea3b5f2a53..3587fdc2b8 100644 --- a/samples/DashboardDemo/test/DashboardDemo.HttpApi.Client.ConsoleTestApp/DashboardDemo.HttpApi.Client.ConsoleTestApp.csproj +++ b/samples/DashboardDemo/test/DashboardDemo.HttpApi.Client.ConsoleTestApp/DashboardDemo.HttpApi.Client.ConsoleTestApp.csproj @@ -17,5 +17,9 @@ + + + + From e0c821a89289f277371230c4407b4c6978d21010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 3 Mar 2020 11:39:55 +0300 Subject: [PATCH 08/10] Update Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj --- .../Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/samples/EfCoreMigrationDemo/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj b/samples/EfCoreMigrationDemo/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj index 561ad3012d..d96dcacc8b 100644 --- a/samples/EfCoreMigrationDemo/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj +++ b/samples/EfCoreMigrationDemo/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj @@ -20,5 +20,9 @@ + + + + From f70c2280f701f9dd906e3224eb807982114302ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 3 Mar 2020 11:40:36 +0300 Subject: [PATCH 09/10] Apply #2960 for the microservice demo solution. --- .../BackendAdminApp.Host/BackendAdminApp.Host.csproj | 2 +- .../BackendAdminApp.Host/BackendAdminAppHostModule.cs | 4 ++-- .../applications/ConsoleClientDemo/ConsoleClientDemo.csproj | 4 ++++ .../applications/PublicWebSite.Host/PublicWebSite.Host.csproj | 2 +- .../PublicWebSite.Host/PublicWebSiteHostModule.cs | 4 ++-- .../BackendAdminAppGateway.Host.csproj | 2 +- .../BackendAdminAppGatewayHostModule.cs | 4 ++-- .../BloggingService.Host/BloggingService.Host.csproj | 2 +- .../BloggingService.Host/BloggingServiceHostModule.cs | 4 ++-- 9 files changed, 16 insertions(+), 12 deletions(-) diff --git a/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminApp.Host.csproj b/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminApp.Host.csproj index bc29c3d237..cc23b9f584 100644 --- a/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminApp.Host.csproj +++ b/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminApp.Host.csproj @@ -25,7 +25,7 @@ - + diff --git a/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminAppHostModule.cs b/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminAppHostModule.cs index d04fc1e656..395b40aeb0 100644 --- a/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminAppHostModule.cs +++ b/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminAppHostModule.cs @@ -13,7 +13,7 @@ using Volo.Abp.AspNetCore.Authentication.OAuth; using Volo.Abp.AspNetCore.Mvc.Client; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; using Volo.Abp.Autofac; -using Volo.Abp.Http.Client.IdentityModel; +using Volo.Abp.Http.Client.IdentityModel.Web; using Volo.Abp.Identity; using Volo.Abp.Identity.Web; using Volo.Abp.Localization; @@ -27,7 +27,7 @@ namespace BackendAdminApp.Host typeof(AbpAutofacModule), typeof(AbpAspNetCoreMvcClientModule), typeof(AbpAspNetCoreAuthenticationOAuthModule), - typeof(AbpHttpClientIdentityModelModule), + typeof(AbpHttpClientIdentityModelWebModule), typeof(AbpIdentityHttpApiClientModule), typeof(AbpIdentityWebModule), typeof(BloggingApplicationContractsModule), diff --git a/samples/MicroserviceDemo/applications/ConsoleClientDemo/ConsoleClientDemo.csproj b/samples/MicroserviceDemo/applications/ConsoleClientDemo/ConsoleClientDemo.csproj index 7ee4c756aa..2443f75e5d 100644 --- a/samples/MicroserviceDemo/applications/ConsoleClientDemo/ConsoleClientDemo.csproj +++ b/samples/MicroserviceDemo/applications/ConsoleClientDemo/ConsoleClientDemo.csproj @@ -16,6 +16,10 @@ + + + + diff --git a/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSite.Host.csproj b/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSite.Host.csproj index 2370ae2a7a..24b6082352 100644 --- a/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSite.Host.csproj +++ b/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSite.Host.csproj @@ -24,7 +24,7 @@ - + diff --git a/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSiteHostModule.cs b/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSiteHostModule.cs index 66ea6d174c..4948995e35 100644 --- a/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSiteHostModule.cs +++ b/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSiteHostModule.cs @@ -11,7 +11,7 @@ using Volo.Abp.AspNetCore.Authentication.OAuth; using Volo.Abp.AspNetCore.Mvc.Client; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; using Volo.Abp.Autofac; -using Volo.Abp.Http.Client.IdentityModel; +using Volo.Abp.Http.Client.IdentityModel.Web; using Volo.Abp.Localization; using Volo.Abp.Modularity; using Volo.Abp.UI.Navigation; @@ -23,7 +23,7 @@ namespace PublicWebSite.Host typeof(AbpAutofacModule), typeof(AbpAspNetCoreMvcClientModule), typeof(AbpAspNetCoreAuthenticationOAuthModule), - typeof(AbpHttpClientIdentityModelModule), + typeof(AbpHttpClientIdentityModelWebModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule), typeof(BloggingHttpApiClientModule), typeof(BloggingWebModule), diff --git a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj index 89c3bdb5be..4e2bbba6a6 100644 --- a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj +++ b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj @@ -25,7 +25,7 @@ - + diff --git a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGatewayHostModule.cs b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGatewayHostModule.cs index 81a109a6f0..7004215dcf 100644 --- a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGatewayHostModule.cs +++ b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGatewayHostModule.cs @@ -14,7 +14,7 @@ using Volo.Abp; using Volo.Abp.Autofac; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.SqlServer; -using Volo.Abp.Http.Client.IdentityModel; +using Volo.Abp.Http.Client.IdentityModel.Web; using Volo.Abp.Identity; using Volo.Abp.Modularity; using Volo.Abp.PermissionManagement; @@ -41,7 +41,7 @@ namespace BackendAdminAppGateway.Host typeof(BloggingApplicationContractsModule), typeof(AbpPermissionManagementDomainIdentityModule), typeof(AbpPermissionManagementDomainIdentityServerModule), - typeof(AbpHttpClientIdentityModelModule) + typeof(AbpHttpClientIdentityModelWebModule) )] public class BackendAdminAppGatewayHostModule : AbpModule { diff --git a/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingService.Host.csproj b/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingService.Host.csproj index 5bb58b92ec..024d64a5e4 100644 --- a/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingService.Host.csproj +++ b/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingService.Host.csproj @@ -25,7 +25,7 @@ - + diff --git a/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingServiceHostModule.cs b/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingServiceHostModule.cs index 2d7e945cf5..b72a4f56a6 100644 --- a/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingServiceHostModule.cs +++ b/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingServiceHostModule.cs @@ -19,7 +19,7 @@ using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.SqlServer; using Volo.Abp.EventBus.RabbitMq; using Volo.Abp.Guids; -using Volo.Abp.Http.Client.IdentityModel; +using Volo.Abp.Http.Client.IdentityModel.Web; using Volo.Abp.Identity; using Volo.Abp.Localization; using Volo.Abp.Modularity; @@ -44,7 +44,7 @@ namespace BloggingService.Host typeof(BloggingHttpApiModule), typeof(BloggingMongoDbModule), typeof(BloggingApplicationModule), - typeof(AbpHttpClientIdentityModelModule), + typeof(AbpHttpClientIdentityModelWebModule), typeof(AbpIdentityHttpApiClientModule) )] public class BloggingServiceHostModule : AbpModule From 7d94050caec05bdb3b2095d3d26a0869d9104c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 3 Mar 2020 11:41:53 +0300 Subject: [PATCH 10/10] Apply #2960 for the module template --- .../MyCompanyName.MyProjectName.Web.Host.csproj | 2 +- .../MyProjectNameWebHostModule.cs | 4 ++-- ...anyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj index 338f55bc5f..d3e5f19e78 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj @@ -20,7 +20,7 @@ - + diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs index 41fb8fc7f2..41b48d4548 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs @@ -26,7 +26,7 @@ using Volo.Abp.Autofac; using Volo.Abp.AutoMapper; using Volo.Abp.Caching; using Volo.Abp.FeatureManagement; -using Volo.Abp.Http.Client.IdentityModel; +using Volo.Abp.Http.Client.IdentityModel.Web; using Volo.Abp.Identity; using Volo.Abp.Identity.Web; using Volo.Abp.Modularity; @@ -50,7 +50,7 @@ namespace MyCompanyName.MyProjectName typeof(AbpAspNetCoreMvcClientModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule), typeof(AbpAutofacModule), - typeof(AbpHttpClientIdentityModelModule), + typeof(AbpHttpClientIdentityModelWebModule), typeof(AbpIdentityWebModule), typeof(AbpIdentityHttpApiClientModule), typeof(AbpTenantManagementWebModule), diff --git a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj index 35f7e7344c..59de0da1ef 100644 --- a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj +++ b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj @@ -19,4 +19,8 @@ + + + +