diff --git a/src/Services/Basket/Basket.SignalrHub/AutofacModules/ApplicationModule.cs b/src/Services/Basket/Basket.SignalrHub/AutofacModules/ApplicationModule.cs
index 9cdf7cf45..d344abcaa 100644
--- a/src/Services/Basket/Basket.SignalrHub/AutofacModules/ApplicationModule.cs
+++ b/src/Services/Basket/Basket.SignalrHub/AutofacModules/ApplicationModule.cs
@@ -1,5 +1,4 @@
using Autofac;
-using Basket.SignalrHub.IntegrationEvents;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
using System;
using System.Collections.Generic;
@@ -25,8 +24,6 @@ namespace Basket.SignalrHub.AutofacModules
// builder.RegisterAssemblyTypes(typeof(NewIntegrationEvent).GetTypeInfo().Assembly)
// .AsClosedTypesOf(typeof(IIntegrationEventHandler<>));
- builder.RegisterAssemblyTypes(typeof(UserAddedCartItemToBasketIntegrationEvent).GetTypeInfo().Assembly)
- .AsClosedTypesOf(typeof(IIntegrationEventHandler<>));
}
}
}
diff --git a/src/Services/Basket/Basket.SignalrHub/Basket.SignalrHub.csproj b/src/Services/Basket/Basket.SignalrHub/Basket.SignalrHub.csproj
index df9ff1c11..485dd9c85 100644
--- a/src/Services/Basket/Basket.SignalrHub/Basket.SignalrHub.csproj
+++ b/src/Services/Basket/Basket.SignalrHub/Basket.SignalrHub.csproj
@@ -6,6 +6,8 @@
+
+
diff --git a/src/Services/Basket/Basket.SignalrHub/IntegrationEvents/EventHandling/UserAddedCartItemToBasketIntegrationEventHandler.cs b/src/Services/Basket/Basket.SignalrHub/IntegrationEvents/EventHandling/UserAddedCartItemToBasketIntegrationEventHandler.cs
deleted file mode 100644
index c65192ed5..000000000
--- a/src/Services/Basket/Basket.SignalrHub/IntegrationEvents/EventHandling/UserAddedCartItemToBasketIntegrationEventHandler.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using Microsoft.AspNetCore.SignalR;
-using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
-using Microsoft.Extensions.Logging;
-using Basket.SignalrHub.IntegrationEvents;
-using Serilog.Context;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace Basket.SignalrHub.IntegrationEvents.EventHandling
-{
- public class UserAddedCartItemToBasketIntegrationEventHandler :
- IIntegrationEventHandler
- {
- private readonly IHubContext _hubContext;
- private readonly ILogger _logger;
-
- public UserAddedCartItemToBasketIntegrationEventHandler(
- IHubContext hubContext,
- ILogger logger)
- {
- _hubContext = hubContext ?? throw new ArgumentNullException(nameof(hubContext));
- _logger = logger ?? throw new ArgumentNullException(nameof(logger));
- }
-
-
- public async Task Handle(UserAddedCartItemToBasketIntegrationEvent @event)
- {
- using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.AppName}"))
- {
- _logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppName} - ({@IntegrationEvent})", @event.Id, Program.AppName, @event);
-
- await _hubContext.Clients
- .Group(@event.BuyerName)
- .SendAsync("UpdateBasketCount", "test message");
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/Services/Basket/Basket.SignalrHub/IntegrationEvents/Events/BasketItem.cs b/src/Services/Basket/Basket.SignalrHub/IntegrationEvents/Events/BasketItem.cs
deleted file mode 100644
index ddf5d13b7..000000000
--- a/src/Services/Basket/Basket.SignalrHub/IntegrationEvents/Events/BasketItem.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-
-namespace Basket.SignalrHub.IntegrationEvents
-{
- public class BasketItem : IValidatableObject
- {
- public string Id { get; set; }
- public string ProductId { get; set; }
- public string ProductName { get; set; }
- public decimal UnitPrice { get; set; }
- public decimal OldUnitPrice { get; set; }
- public int Quantity { get; set; }
- public string PictureUrl { get; set; }
- public IEnumerable Validate(ValidationContext validationContext)
- {
- var results = new List();
-
- if (Quantity < 1)
- {
- results.Add(new ValidationResult("Invalid number of units", new []{ "Quantity" }));
- }
-
- return results;
- }
- }
-}
diff --git a/src/Services/Basket/Basket.SignalrHub/IntegrationEvents/Events/UserAddedCartItemToBasketIntegrationEvent.cs b/src/Services/Basket/Basket.SignalrHub/IntegrationEvents/Events/UserAddedCartItemToBasketIntegrationEvent.cs
deleted file mode 100644
index fde8da774..000000000
--- a/src/Services/Basket/Basket.SignalrHub/IntegrationEvents/Events/UserAddedCartItemToBasketIntegrationEvent.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
-using System.Collections.Generic;
-
-namespace Basket.SignalrHub.IntegrationEvents
-{
- public class UserAddedCartItemToBasketIntegrationEvent : IntegrationEvent
- {
- public string BuyerName { get; set; }
- public BasketItem Item { get; set; }
-
- public UserAddedCartItemToBasketIntegrationEvent(string buyerName, BasketItem basketItem)
- {
- BuyerName = buyerName;
- Item = basketItem;
- }
- }
-}
diff --git a/src/Services/Basket/Basket.SignalrHub/Startup.cs b/src/Services/Basket/Basket.SignalrHub/Startup.cs
index 87e80caff..877c30722 100644
--- a/src/Services/Basket/Basket.SignalrHub/Startup.cs
+++ b/src/Services/Basket/Basket.SignalrHub/Startup.cs
@@ -17,8 +17,6 @@ using HealthChecks.UI.Client;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Basket.SignalrHub.AutofacModules;
-using Basket.SignalrHub.IntegrationEvents;
-using Basket.SignalrHub.IntegrationEvents.EventHandling;
namespace Basket.SignalrHub
{
@@ -162,7 +160,6 @@ namespace Basket.SignalrHub
// Event bus subscribe events goes here
// eventBus.Subscribe();
- eventBus.Subscribe();
}
private void ConfigureAuthService(IServiceCollection services)
diff --git a/src/Services/Ordering/Ordering.SignalrHub/Startup.cs b/src/Services/Ordering/Ordering.SignalrHub/Startup.cs
index c7089ec3c..894db7358 100644
--- a/src/Services/Ordering/Ordering.SignalrHub/Startup.cs
+++ b/src/Services/Ordering/Ordering.SignalrHub/Startup.cs
@@ -167,7 +167,7 @@ namespace Ordering.SignalrHub
eventBus.Subscribe();
eventBus.Subscribe();
eventBus.Subscribe();
- //eventBus.Subscribe();
+ eventBus.Subscribe();
}
private void ConfigureAuthService(IServiceCollection services)
diff --git a/src/Web/WebMVC/Startup.cs b/src/Web/WebMVC/Startup.cs
index 3192d9b45..52a311369 100644
--- a/src/Web/WebMVC/Startup.cs
+++ b/src/Web/WebMVC/Startup.cs
@@ -266,8 +266,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
options.Scope.Add("marketing");
options.Scope.Add("locations");
options.Scope.Add("webshoppingagg");
- options.Scope.Add("orders.signalrhub");
- options.Scope.Add("basket.signalrhub");
+ options.Scope.Add("orders.signalrhub");
});
return services;
diff --git a/src/Web/WebSPA/Client/modules/shared/services/security.service.ts b/src/Web/WebSPA/Client/modules/shared/services/security.service.ts
index c6170f522..267b3111e 100644
--- a/src/Web/WebSPA/Client/modules/shared/services/security.service.ts
+++ b/src/Web/WebSPA/Client/modules/shared/services/security.service.ts
@@ -81,7 +81,7 @@ export class SecurityService {
let client_id = 'js';
let redirect_uri = location.origin + '/';
let response_type = 'id_token token';
- let scope = 'openid profile orders basket marketing locations webshoppingagg orders.signalrhub basket.signalrhub';
+ let scope = 'openid profile orders basket marketing locations webshoppingagg orders.signalrhub';
let nonce = 'N' + Math.random() + '' + Date.now();
let state = Date.now() + '' + Math.random();