diff --git a/eventhub/EventHub.sln b/eventhub/EventHub.sln index 2e9eaa9..c4717ba 100644 --- a/eventhub/EventHub.sln +++ b/eventhub/EventHub.sln @@ -35,8 +35,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.TestBase", "test\E EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Domain.Tests", "test\EventHub.Domain.Tests\EventHub.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.HttpApi.Client.ConsoleTestApp", "test\EventHub.HttpApi.Client.ConsoleTestApp\EventHub.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.DbMigrator", "src\EventHub.DbMigrator\EventHub.DbMigrator.csproj", "{AA94D832-1CCC-4715-95A9-A483F23A1A5D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Blazor", "src\EventHub.Blazor\EventHub.Blazor.csproj", "{27B2DDC7-8B75-4322-A312-25419C15D9D8}" @@ -105,10 +103,6 @@ Global {E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.Build.0 = Debug|Any CPU {E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.ActiveCfg = Release|Any CPU {E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.Build.0 = Release|Any CPU - {EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.Build.0 = Release|Any CPU {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -140,7 +134,6 @@ Global {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} {91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} {E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} - {EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} {AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} {27B2DDC7-8B75-4322-A312-25419C15D9D8} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} {19F3FAD2-740F-4933-A394-4B030E2ABE6A} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} diff --git a/eventhub/src/EventHub.DbMigrator/appsettings.json b/eventhub/src/EventHub.DbMigrator/appsettings.json index d7b9810..1520392 100644 --- a/eventhub/src/EventHub.DbMigrator/appsettings.json +++ b/eventhub/src/EventHub.DbMigrator/appsettings.json @@ -7,12 +7,7 @@ "EventHub_Web": { "ClientId": "EventHub_Web", "ClientSecret": "1q2w3e*", - "RootUrl": "https://localhost:44395" - }, - "EventHub_App": { - "ClientId": "EventHub_App", - "ClientSecret": "1q2w3e*", - "RootUrl": "http://localhost:4200" + "RootUrl": "https://localhost:44308" }, "EventHub_Blazor": { "ClientId": "EventHub_Blazor", @@ -25,4 +20,4 @@ } } } -} \ No newline at end of file +} diff --git a/eventhub/src/EventHub.HttpApi.Host/appsettings.json b/eventhub/src/EventHub.HttpApi.Host/appsettings.json index 00fbf04..0317bb3 100644 --- a/eventhub/src/EventHub.HttpApi.Host/appsettings.json +++ b/eventhub/src/EventHub.HttpApi.Host/appsettings.json @@ -1,6 +1,6 @@ { "App": { - "CorsOrigins": "https://*.EventHub.com,https://localhost:44307" + "CorsOrigins": "https://*.EventHub.com,https://localhost:44307,https://localhost:44308" }, "ConnectionStrings": { "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=EventHub;Trusted_Connection=True" @@ -28,4 +28,4 @@ "Abp.Mailing.DefaultFromAddress": "noreply@abp.io", "Abp.Mailing.DefaultFromDisplayName": "ABP application" } -} \ No newline at end of file +} diff --git a/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs b/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs deleted file mode 100644 index a4c3a12..0000000 --- a/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Threading.Tasks; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Identity; - -namespace EventHub.HttpApi.Client.ConsoleTestApp -{ - public class ClientDemoService : ITransientDependency - { - private readonly IProfileAppService _profileAppService; - - public ClientDemoService(IProfileAppService profileAppService) - { - _profileAppService = profileAppService; - } - - public async Task RunAsync() - { - var output = await _profileAppService.GetAsync(); - Console.WriteLine($"UserName : {output.UserName}"); - Console.WriteLine($"Email : {output.Email}"); - Console.WriteLine($"Name : {output.Name}"); - Console.WriteLine($"Surname : {output.Surname}"); - } - } -} \ No newline at end of file diff --git a/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs b/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs deleted file mode 100644 index cd1d0a8..0000000 --- a/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.Extensions.Hosting; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp; - -namespace EventHub.HttpApi.Client.ConsoleTestApp -{ - public class ConsoleTestAppHostedService : IHostedService - { - public async Task StartAsync(CancellationToken cancellationToken) - { - using (var application = AbpApplicationFactory.Create()) - { - application.Initialize(); - - var demo = application.ServiceProvider.GetRequiredService(); - await demo.RunAsync(); - - application.Shutdown(); - } - } - - public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; - } -} diff --git a/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/EventHub.HttpApi.Client.ConsoleTestApp.csproj b/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/EventHub.HttpApi.Client.ConsoleTestApp.csproj deleted file mode 100644 index f96343b..0000000 --- a/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/EventHub.HttpApi.Client.ConsoleTestApp.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - Exe - net5.0 - - - - - - - - - PreserveNewest - Always - - - - - - - - - - - - - - diff --git a/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/EventHubConsoleApiClientModule.cs b/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/EventHubConsoleApiClientModule.cs deleted file mode 100644 index 8553e13..0000000 --- a/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/EventHubConsoleApiClientModule.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using Microsoft.Extensions.DependencyInjection; -using Polly; -using Volo.Abp.Http.Client; -using Volo.Abp.Http.Client.IdentityModel; -using Volo.Abp.Modularity; - -namespace EventHub.HttpApi.Client.ConsoleTestApp -{ - [DependsOn( - typeof(EventHubHttpApiClientModule), - typeof(AbpHttpClientIdentityModelModule) - )] - public class EventHubConsoleApiClientModule : AbpModule - { - public override void PreConfigureServices(ServiceConfigurationContext context) - { - PreConfigure(options => - { - options.ProxyClientBuildActions.Add((remoteServiceName, clientBuilder) => - { - clientBuilder.AddTransientHttpErrorPolicy( - policyBuilder => policyBuilder.WaitAndRetryAsync(3, i => TimeSpan.FromSeconds(Math.Pow(2, i))) - ); - }); - }); - } - } -} diff --git a/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/Program.cs b/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/Program.cs deleted file mode 100644 index 3a29446..0000000 --- a/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/Program.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Threading.Tasks; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; - -namespace EventHub.HttpApi.Client.ConsoleTestApp -{ - class Program - { - static async Task Main(string[] args) - { - await CreateHostBuilder(args).RunConsoleAsync(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureServices((hostContext, services) => - { - services.AddHostedService(); - }); - } -} diff --git a/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/appsettings.json b/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/appsettings.json deleted file mode 100644 index fdfd0be..0000000 --- a/eventhub/test/EventHub.HttpApi.Client.ConsoleTestApp/appsettings.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "RemoteServices": { - "Default": { - "BaseUrl": "https://localhost:44362" - } - }, - "IdentityClients": { - "Default": { - "GrantType": "password", - "ClientId": "EventHub_App", - "ClientSecret": "1q2w3e*", - "UserName": "admin", - "UserPassword": "1q2w3E*", - "Authority": "https://localhost:44313", - "Scope": "EventHub" - } - } -} \ No newline at end of file