Merge dev to feature branch (#1476)
* Fixed firewall rules check and improved the script the check shall be like ~ Get-NetFirewallRule -DisplayName eShopOnContainers-* -ErrorAction Stop * #1397: Replaced deprecated docker.for.win.localhost by host.docker.internal in src/.env (#1400) * Updated Readme (#1402) Fixed sentence structure in Readme. Changed "and a several" to "with several." * CatalogService: Fix issue with Status set when items list is empty (#1304) * Fix issue with Status set when items list is empty * Change method Count() call to Count property Co-authored-by: Dmytro Hridin <v-dmytro.hridin@lionbridge.com> * refactored Equals() method on ValueObject (#1316) * Fix/1403and1404 removed duplicate Key SubscriptionClientName and added app.UseAuthorization() call (#1406) * #1403 removed duplicate Key SubscriptionClientName Removed duplicate key SubscriptionClientName from Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json and sorted its content in asc order. * #1404 Added app.UseAuthorization() call Added app.UseAuthorization() call to BasketTestsStartup, LocationsTestsStartup, and MarketingTestsStartup to fix failed unit tests IntegrationEventsScenarios.Post_update_product_price_and_catalog_and_basket_list_modified and MarketingScenarios.Set_new_user_location_and_get_location_campaign_by_user_id (see #1404) * Fix for Campaigns exception and SignalR 401 Unauthorized (#1374) * update API Gateway - /locations-api/ @ webmarketing/envoy.yaml * updated signalr services - envoy: webmarketingapigw - latest client: webmvc - service hub: ordering-signalrhub Co-authored-by: hfz-r <hafiz.roslan@hartalega.com.my> * Mis-Spelled 'client' (#1411) * fix parameter error in multiarch job (#1413) * Private readonly string changed to private const string (#1288) * fix disposing of direct instantiated objects in calalog service #1392 (#1395) * Updated version of different packages. (#1420) * for issue #1423: changed literal string "OpenIdConnect" to constant string (#1424) Co-authored-by: Jeremiah Flaga <j.flaga@arcanys.com> * Updated node-fetch package version. (#1426) * Updated node-fetch package version. * Updated node-forge version. * Fixes #1474: webspa container does not build when running docker-compose up.Updated sha hashes in packages-lock.json (#1475) * Change ReadAllBytes to ReadAllBytesAsync in PicController (#1425) Co-authored-by: edmondshtogu <edmondshtogu@gmail.com> Co-authored-by: InstanceFactory <InstanceFactory@users.noreply.github.com> Co-authored-by: Sumit Ghosh <sumit.ghosh@neudesic.com> Co-authored-by: Yosef Herskovitz <34112131+H3RSKO@users.noreply.github.com> Co-authored-by: Dmytro Hridin <dmytro.hridin@gmail.com> Co-authored-by: Dmytro Hridin <v-dmytro.hridin@lionbridge.com> Co-authored-by: André Silva <andrefilipegsilva@outlook.com> Co-authored-by: hfz-r <39443205+hfz-r@users.noreply.github.com> Co-authored-by: hfz-r <hafiz.roslan@hartalega.com.my> Co-authored-by: Majid Ali Khan Quaid <contactmakq@gmail.com> Co-authored-by: Javier Vela <fjvela@gmail.com> Co-authored-by: Facundo La Rocca <facundo_larocca@yahoo.com.ar> Co-authored-by: Nabil Sedoud <nsedoud@gmail.com> Co-authored-by: jeremiahflaga <flaga.jeremiah@gmail.com> Co-authored-by: Jeremiah Flaga <j.flaga@arcanys.com> Co-authored-by: Wojciech Rak <wojciechrak@users.noreply.github.com> Co-authored-by: Zakaria <23211915+zakaria-c@users.noreply.github.com>
This commit is contained in:
parent
576ce3165d
commit
19a3735c09
@ -59,7 +59,7 @@ Do you want to be up-to-date on .NET Architecture guidance and reference apps li
|
|||||||
|
|
||||||
## Updated for .NET Core 3.1 (LTS)
|
## Updated for .NET Core 3.1 (LTS)
|
||||||
|
|
||||||
eShopOnContainers is updated to .NET Core 3.1 "wave" of technologies. Not just compilation but also new recommended code in EF Core, ASP.NET Core, and other new related versions and a several significant changes.
|
eShopOnContainers is updated to .NET Core 3.1 "wave" of technologies. Not just compilation but also new recommended code in EF Core, ASP.NET Core, and other new related versions with several significant changes.
|
||||||
|
|
||||||
**See more details in the [Release notes](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Release-notes) wiki page**.
|
**See more details in the [Release notes](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Release-notes) wiki page**.
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ jobs:
|
|||||||
mkdir -p ~/.docker
|
mkdir -p ~/.docker
|
||||||
sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json
|
sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json
|
||||||
echo ',"experimental": "enabled" }' >> ~/.docker/config.json
|
echo ',"experimental": "enabled" }' >> ~/.docker/config.json
|
||||||
docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:{{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }}
|
docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }}
|
||||||
docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:latest ${{ parameters.registry }}/${{ parameters.image }}:linux-latest
|
docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:latest ${{ parameters.registry }}/${{ parameters.image }}:linux-latest
|
||||||
docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }}
|
docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }}
|
||||||
docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:latest
|
docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:latest
|
||||||
|
@ -1,26 +1,53 @@
|
|||||||
param([switch]$Elevated)
|
param(
|
||||||
|
[string]$Name = "eShopOnContainers",
|
||||||
|
[string]$InboundDisplayName = "eShopOnContainers-Inbound",
|
||||||
|
[string]$OutboundDisplayName = "eShopOnContainers-Outbound",
|
||||||
|
[switch]$Elevated
|
||||||
|
)
|
||||||
|
|
||||||
function Check-Admin {
|
function Check-Admin {
|
||||||
$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())
|
$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())
|
||||||
$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
|
$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
|
||||||
}
|
}
|
||||||
if ((Check-Admin) -eq $false) {
|
function Add-InboundRule {
|
||||||
if ($elevated)
|
New-NetFirewallRule -DisplayName $InboundDisplayName -Confirm -Description "$Name Inbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Inbound
|
||||||
{
|
|
||||||
# could not elevate, quit
|
|
||||||
}
|
}
|
||||||
|
function Add-OutboundRule {
|
||||||
else {
|
New-NetFirewallRule -DisplayName $OutboundDisplayName -Confirm -Description "$Name Outbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Outbound
|
||||||
|
|
||||||
Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -noexit -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition))
|
|
||||||
}
|
|
||||||
exit
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
if ((Check-Admin) -eq $false) {
|
||||||
Get-NetFirewallRule -DisplayName EshopDocker -ErrorAction Stop
|
if ($elevated)
|
||||||
Write-Host "Rule found"
|
{
|
||||||
|
# could not elevate, quit
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -noexit -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition))
|
||||||
|
}
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
$rules = $(Get-NetFirewallRule -DisplayName $Name-* -ErrorAction Stop | Out-String)
|
||||||
|
if (!$rules.Contains($InboundDisplayName) -and !$rules.Contains($OutboundDisplayName))
|
||||||
|
{
|
||||||
|
Add-InboundRule
|
||||||
|
Add-OutboundRule
|
||||||
|
}
|
||||||
|
elseif (!$rules.Contains($InboundDisplayName))
|
||||||
|
{
|
||||||
|
Add-InboundRule
|
||||||
|
}
|
||||||
|
elseif (!$rules.Contains($OutboundDisplayName))
|
||||||
|
{
|
||||||
|
Add-OutboundRule
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Write-Host "Rules found!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch [Exception] {
|
||||||
|
Add-InboundRule
|
||||||
|
Add-OutboundRule
|
||||||
}
|
}
|
||||||
catch [Exception] {
|
|
||||||
New-NetFirewallRule -DisplayName eShopOnContainers-Inbound -Confirm -Description "eShopOnContainers Inbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Inbound
|
|
||||||
New-NetFirewallRule -DisplayName eShopOnContainers-Outbound -Confirm -Description "eShopOnContainers Outbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Outbound
|
|
||||||
}
|
|
6
src/.env
6
src/.env
@ -5,9 +5,9 @@
|
|||||||
# The IP below should be swapped to your real IP or DNS name, like 192.168.88.248, etc. if testing from remote browsers or mobile devices
|
# The IP below should be swapped to your real IP or DNS name, like 192.168.88.248, etc. if testing from remote browsers or mobile devices
|
||||||
|
|
||||||
# Use this values to run the app locally in Windows
|
# Use this values to run the app locally in Windows
|
||||||
ESHOP_EXTERNAL_DNS_NAME_OR_IP=docker.for.win.localhost
|
ESHOP_EXTERNAL_DNS_NAME_OR_IP=host.docker.internal
|
||||||
ESHOP_STORAGE_CATALOG_URL=http://docker.for.win.localhost:5202/c/api/v1/catalog/items/[0]/pic/
|
ESHOP_STORAGE_CATALOG_URL=http://host.docker.internal:5202/c/api/v1/catalog/items/[0]/pic/
|
||||||
ESHOP_STORAGE_MARKETING_URL=http://docker.for.win.localhost:5110/api/v1/campaigns/[0]/pic/
|
ESHOP_STORAGE_MARKETING_URL=http://host.docker.internal:5110/api/v1/campaigns/[0]/pic/
|
||||||
|
|
||||||
# Use this values to run the app locally in Mac
|
# Use this values to run the app locally in Mac
|
||||||
# ESHOP_EXTERNAL_DNS_NAME_OR_IP=docker.for.mac.localhost
|
# ESHOP_EXTERNAL_DNS_NAME_OR_IP=docker.for.mac.localhost
|
||||||
|
@ -36,6 +36,19 @@ static_resources:
|
|||||||
route:
|
route:
|
||||||
auto_host_rewrite: true
|
auto_host_rewrite: true
|
||||||
cluster: marketing
|
cluster: marketing
|
||||||
|
- name: "l-short"
|
||||||
|
match:
|
||||||
|
prefix: "/l/"
|
||||||
|
route:
|
||||||
|
auto_host_rewrite: true
|
||||||
|
prefix_rewrite: "/locations-api/"
|
||||||
|
cluster: locations
|
||||||
|
- name: "l-long"
|
||||||
|
match:
|
||||||
|
prefix: "/locations-api/"
|
||||||
|
route:
|
||||||
|
auto_host_rewrite: true
|
||||||
|
cluster: locations
|
||||||
http_filters:
|
http_filters:
|
||||||
- name: envoy.router
|
- name: envoy.router
|
||||||
access_log:
|
access_log:
|
||||||
|
@ -56,6 +56,9 @@ static_resources:
|
|||||||
auto_host_rewrite: true
|
auto_host_rewrite: true
|
||||||
cluster: signalr-hub
|
cluster: signalr-hub
|
||||||
timeout: 300s
|
timeout: 300s
|
||||||
|
upgrade_configs:
|
||||||
|
upgrade_type: "websocket"
|
||||||
|
enabled: true
|
||||||
- name: "b-short"
|
- name: "b-short"
|
||||||
match:
|
match:
|
||||||
prefix: "/b/"
|
prefix: "/b/"
|
||||||
|
@ -21,12 +21,12 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ
|
|||||||
public class EventBusRabbitMQ : IEventBus, IDisposable
|
public class EventBusRabbitMQ : IEventBus, IDisposable
|
||||||
{
|
{
|
||||||
const string BROKER_NAME = "eshop_event_bus";
|
const string BROKER_NAME = "eshop_event_bus";
|
||||||
|
const string AUTOFAC_SCOPE_NAME = "eshop_event_bus";
|
||||||
|
|
||||||
private readonly IRabbitMQPersistentConnection _persistentConnection;
|
private readonly IRabbitMQPersistentConnection _persistentConnection;
|
||||||
private readonly ILogger<EventBusRabbitMQ> _logger;
|
private readonly ILogger<EventBusRabbitMQ> _logger;
|
||||||
private readonly IEventBusSubscriptionsManager _subsManager;
|
private readonly IEventBusSubscriptionsManager _subsManager;
|
||||||
private readonly ILifetimeScope _autofac;
|
private readonly ILifetimeScope _autofac;
|
||||||
private readonly string AUTOFAC_SCOPE_NAME = "eshop_event_bus";
|
|
||||||
private readonly int _retryCount;
|
private readonly int _retryCount;
|
||||||
|
|
||||||
private IModel _consumerChannel;
|
private IModel _consumerChannel;
|
||||||
@ -86,7 +86,6 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ
|
|||||||
|
|
||||||
using (var channel = _persistentConnection.CreateModel())
|
using (var channel = _persistentConnection.CreateModel())
|
||||||
{
|
{
|
||||||
|
|
||||||
_logger.LogTrace("Declaring RabbitMQ exchange to publish event: {EventId}", @event.Id);
|
_logger.LogTrace("Declaring RabbitMQ exchange to publish event: {EventId}", @event.Id);
|
||||||
|
|
||||||
channel.ExchangeDeclare(exchange: BROKER_NAME, type: "direct");
|
channel.ExchangeDeclare(exchange: BROKER_NAME, type: "direct");
|
||||||
|
@ -15,11 +15,12 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services
|
namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services
|
||||||
{
|
{
|
||||||
public class IntegrationEventLogService : IIntegrationEventLogService
|
public class IntegrationEventLogService : IIntegrationEventLogService,IDisposable
|
||||||
{
|
{
|
||||||
private readonly IntegrationEventLogContext _integrationEventLogContext;
|
private readonly IntegrationEventLogContext _integrationEventLogContext;
|
||||||
private readonly DbConnection _dbConnection;
|
private readonly DbConnection _dbConnection;
|
||||||
private readonly List<Type> _eventTypes;
|
private readonly List<Type> _eventTypes;
|
||||||
|
private volatile bool disposedValue;
|
||||||
|
|
||||||
public IntegrationEventLogService(DbConnection dbConnection)
|
public IntegrationEventLogService(DbConnection dbConnection)
|
||||||
{
|
{
|
||||||
@ -89,5 +90,25 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Servi
|
|||||||
|
|
||||||
return _integrationEventLogContext.SaveChangesAsync();
|
return _integrationEventLogContext.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (!disposedValue)
|
||||||
|
{
|
||||||
|
if (disposing)
|
||||||
|
{
|
||||||
|
_integrationEventLogContext?.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
disposedValue = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
Dispose(disposing: true);
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers
|
|||||||
string imageFileExtension = Path.GetExtension(item.PictureFileName);
|
string imageFileExtension = Path.GetExtension(item.PictureFileName);
|
||||||
string mimetype = GetImageMimeTypeFromImageFileExtension(imageFileExtension);
|
string mimetype = GetImageMimeTypeFromImageFileExtension(imageFileExtension);
|
||||||
|
|
||||||
var buffer = System.IO.File.ReadAllBytes(path);
|
var buffer = await System.IO.File.ReadAllBytesAsync(path);
|
||||||
|
|
||||||
return File(buffer, mimetype);
|
return File(buffer, mimetype);
|
||||||
}
|
}
|
||||||
|
@ -68,11 +68,10 @@ namespace Catalog.API.Grpc
|
|||||||
{
|
{
|
||||||
var items = await GetItemsByIdsAsync(request.Ids);
|
var items = await GetItemsByIdsAsync(request.Ids);
|
||||||
|
|
||||||
if (!items.Any())
|
context.Status = !items.Any() ?
|
||||||
{
|
new Status(StatusCode.NotFound, $"ids value invalid. Must be comma-separated list of numbers") :
|
||||||
context.Status = new Status(StatusCode.NotFound, $"ids value invalid. Must be comma-separated list of numbers");
|
new Status(StatusCode.OK, string.Empty);
|
||||||
}
|
|
||||||
context.Status = new Status(StatusCode.OK, string.Empty);
|
|
||||||
return this.MapToResponse(items);
|
return this.MapToResponse(items);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +103,7 @@ namespace Catalog.API.Grpc
|
|||||||
|
|
||||||
private PaginatedItemsResponse MapToResponse(List<CatalogItem> items)
|
private PaginatedItemsResponse MapToResponse(List<CatalogItem> items)
|
||||||
{
|
{
|
||||||
return this.MapToResponse(items, items.Count(), 1, items.Count());
|
return this.MapToResponse(items, items.Count, 1, items.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
private PaginatedItemsResponse MapToResponse(List<CatalogItem> items, long count, int pageIndex, int pageSize)
|
private PaginatedItemsResponse MapToResponse(List<CatalogItem> items, long count, int pageIndex, int pageSize)
|
||||||
|
@ -14,13 +14,14 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Catalog.API.IntegrationEvents
|
namespace Catalog.API.IntegrationEvents
|
||||||
{
|
{
|
||||||
public class CatalogIntegrationEventService : ICatalogIntegrationEventService
|
public class CatalogIntegrationEventService : ICatalogIntegrationEventService,IDisposable
|
||||||
{
|
{
|
||||||
private readonly Func<DbConnection, IIntegrationEventLogService> _integrationEventLogServiceFactory;
|
private readonly Func<DbConnection, IIntegrationEventLogService> _integrationEventLogServiceFactory;
|
||||||
private readonly IEventBus _eventBus;
|
private readonly IEventBus _eventBus;
|
||||||
private readonly CatalogContext _catalogContext;
|
private readonly CatalogContext _catalogContext;
|
||||||
private readonly IIntegrationEventLogService _eventLogService;
|
private readonly IIntegrationEventLogService _eventLogService;
|
||||||
private readonly ILogger<CatalogIntegrationEventService> _logger;
|
private readonly ILogger<CatalogIntegrationEventService> _logger;
|
||||||
|
private volatile bool disposedValue;
|
||||||
|
|
||||||
public CatalogIntegrationEventService(
|
public CatalogIntegrationEventService(
|
||||||
ILogger<CatalogIntegrationEventService> logger,
|
ILogger<CatalogIntegrationEventService> logger,
|
||||||
@ -65,5 +66,24 @@ namespace Catalog.API.IntegrationEvents
|
|||||||
await _eventLogService.SaveEventAsync(evt, _catalogContext.Database.CurrentTransaction);
|
await _eventLogService.SaveEventAsync(evt, _catalogContext.Database.CurrentTransaction);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (!disposedValue)
|
||||||
|
{
|
||||||
|
if (disposing)
|
||||||
|
{
|
||||||
|
(_eventLogService as IDisposable)?.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
disposedValue = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
Dispose(disposing: true);
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
"UseVault": false,
|
"UseVault": false,
|
||||||
"Vault": {
|
"Vault": {
|
||||||
"Name": "eshop",
|
"Name": "eshop",
|
||||||
"ClientId": "your-clien-id",
|
"ClientId": "your-client-id",
|
||||||
"ClientSecret": "your-client-secret"
|
"ClientSecret": "your-client-secret"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.O
|
|||||||
ZipCode = zipcode;
|
ZipCode = zipcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<object> GetAtomicValues()
|
protected override IEnumerable<object> GetEqualityComponents()
|
||||||
{
|
{
|
||||||
// Using a yield return statement to return each element one at a time
|
// Using a yield return statement to return each element one at a time
|
||||||
yield return Street;
|
yield return Street;
|
||||||
|
@ -19,7 +19,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork
|
|||||||
return !(EqualOperator(left, right));
|
return !(EqualOperator(left, right));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract IEnumerable<object> GetAtomicValues();
|
protected abstract IEnumerable<object> GetEqualityComponents();
|
||||||
|
|
||||||
public override bool Equals(object obj)
|
public override bool Equals(object obj)
|
||||||
{
|
{
|
||||||
@ -27,26 +27,15 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ValueObject other = (ValueObject)obj;
|
|
||||||
IEnumerator<object> thisValues = GetAtomicValues().GetEnumerator();
|
var other = (ValueObject)obj;
|
||||||
IEnumerator<object> otherValues = other.GetAtomicValues().GetEnumerator();
|
|
||||||
while (thisValues.MoveNext() && otherValues.MoveNext())
|
return this.GetEqualityComponents().SequenceEqual(other.GetEqualityComponents());
|
||||||
{
|
|
||||||
if (ReferenceEquals(thisValues.Current, null) ^ ReferenceEquals(otherValues.Current, null))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (thisValues.Current != null && !thisValues.Current.Equals(otherValues.Current))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return !thisValues.MoveNext() && !otherValues.MoveNext();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
{
|
{
|
||||||
return GetAtomicValues()
|
return GetEqualityComponents()
|
||||||
.Select(x => x != null ? x.GetHashCode() : 0)
|
.Select(x => x != null ? x.GetHashCode() : 0)
|
||||||
.Aggregate((x, y) => x ^ y);
|
.Aggregate((x, y) => x ^ y);
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ using Ordering.SignalrHub.IntegrationEvents.EventHandling;
|
|||||||
using Ordering.SignalrHub.IntegrationEvents.Events;
|
using Ordering.SignalrHub.IntegrationEvents.Events;
|
||||||
using RabbitMQ.Client;
|
using RabbitMQ.Client;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using System.IdentityModel.Tokens.Jwt;
|
using System.IdentityModel.Tokens.Jwt;
|
||||||
|
|
||||||
namespace Ordering.SignalrHub
|
namespace Ordering.SignalrHub
|
||||||
@ -109,7 +110,7 @@ namespace Ordering.SignalrHub
|
|||||||
RegisterEventBus(services);
|
RegisterEventBus(services);
|
||||||
|
|
||||||
services.AddOptions();
|
services.AddOptions();
|
||||||
|
|
||||||
//configure autofac
|
//configure autofac
|
||||||
var container = new ContainerBuilder();
|
var container = new ContainerBuilder();
|
||||||
container.RegisterModule(new ApplicationModule());
|
container.RegisterModule(new ApplicationModule());
|
||||||
@ -133,7 +134,7 @@ namespace Ordering.SignalrHub
|
|||||||
loggerFactory.CreateLogger<Startup>().LogDebug("Using PATH BASE '{pathBase}'", pathBase);
|
loggerFactory.CreateLogger<Startup>().LogDebug("Using PATH BASE '{pathBase}'", pathBase);
|
||||||
app.UsePathBase(pathBase);
|
app.UsePathBase(pathBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
app.UseCors("CorsPolicy");
|
app.UseCors("CorsPolicy");
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
@ -150,7 +151,7 @@ namespace Ordering.SignalrHub
|
|||||||
{
|
{
|
||||||
Predicate = r => r.Name.Contains("self")
|
Predicate = r => r.Name.Contains("self")
|
||||||
});
|
});
|
||||||
endpoints.MapHub<NotificationsHub>("/hub/notificationhub", options => options.Transports = Microsoft.AspNetCore.Http.Connections.HttpTransports.All);
|
endpoints.MapHub<NotificationsHub>("/hub/notificationhub");
|
||||||
});
|
});
|
||||||
|
|
||||||
ConfigureEventBus(app);
|
ConfigureEventBus(app);
|
||||||
@ -185,6 +186,20 @@ namespace Ordering.SignalrHub
|
|||||||
options.Authority = identityUrl;
|
options.Authority = identityUrl;
|
||||||
options.RequireHttpsMetadata = false;
|
options.RequireHttpsMetadata = false;
|
||||||
options.Audience = "orders.signalrhub";
|
options.Audience = "orders.signalrhub";
|
||||||
|
options.Events = new JwtBearerEvents
|
||||||
|
{
|
||||||
|
OnMessageReceived = context =>
|
||||||
|
{
|
||||||
|
var accessToken = context.Request.Query["access_token"];
|
||||||
|
|
||||||
|
var path = context.HttpContext.Request.Path;
|
||||||
|
if (!string.IsNullOrEmpty(accessToken) && (path.StartsWithSegments("/hub/notificationhub")))
|
||||||
|
{
|
||||||
|
context.Token = accessToken;
|
||||||
|
}
|
||||||
|
return Task.CompletedTask;
|
||||||
|
}
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,190 @@
|
|||||||
|
using Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Xunit;
|
||||||
|
|
||||||
|
namespace Ordering.UnitTests.Domain.SeedWork
|
||||||
|
{
|
||||||
|
public class ValueObjectTests
|
||||||
|
{
|
||||||
|
public ValueObjectTests()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
[Theory]
|
||||||
|
[MemberData(nameof(EqualValueObjects))]
|
||||||
|
public void Equals_EqualValueObjects_ReturnsTrue(ValueObject instanceA, ValueObject instanceB, string reason)
|
||||||
|
{
|
||||||
|
// Act
|
||||||
|
var result = EqualityComparer<ValueObject>.Default.Equals(instanceA, instanceB);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
Assert.True(result, reason);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Theory]
|
||||||
|
[MemberData(nameof(NonEqualValueObjects))]
|
||||||
|
public void Equals_NonEqualValueObjects_ReturnsFalse(ValueObject instanceA, ValueObject instanceB, string reason)
|
||||||
|
{
|
||||||
|
// Act
|
||||||
|
var result = EqualityComparer<ValueObject>.Default.Equals(instanceA, instanceB);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
Assert.False(result, reason);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static readonly ValueObject APrettyValueObject = new ValueObjectA(1, "2", Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), new ComplexObject(2, "3"));
|
||||||
|
|
||||||
|
public static readonly TheoryData<ValueObject, ValueObject, string> EqualValueObjects = new TheoryData<ValueObject, ValueObject, string>
|
||||||
|
{
|
||||||
|
{
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
"they should be equal because they are both null"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
APrettyValueObject,
|
||||||
|
APrettyValueObject,
|
||||||
|
"they should be equal because they are the same object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
new ValueObjectA(1, "2", Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), new ComplexObject(2, "3")),
|
||||||
|
new ValueObjectA(1, "2", Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), new ComplexObject(2, "3")),
|
||||||
|
"they should be equal because they have equal members"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
new ValueObjectA(1, "2", Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), new ComplexObject(2, "3"), notAnEqualityComponent: "xpto"),
|
||||||
|
new ValueObjectA(1, "2", Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), new ComplexObject(2, "3"), notAnEqualityComponent: "xpto2"),
|
||||||
|
"they should be equal because all equality components are equal, even though an additional member was set"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
new ValueObjectB(1, "2", 1, 2, 3 ),
|
||||||
|
new ValueObjectB(1, "2", 1, 2, 3 ),
|
||||||
|
"they should be equal because all equality components are equal, including the 'C' list"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static readonly TheoryData<ValueObject, ValueObject, string> NonEqualValueObjects = new TheoryData<ValueObject, ValueObject, string>
|
||||||
|
{
|
||||||
|
{
|
||||||
|
new ValueObjectA(a: 1, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(2, "3")),
|
||||||
|
new ValueObjectA(a: 2, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(2, "3")),
|
||||||
|
"they should not be equal because the 'A' member on ValueObjectA is different among them"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
new ValueObjectA(a: 1, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(2, "3")),
|
||||||
|
new ValueObjectA(a: 1, b: null, c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(2, "3")),
|
||||||
|
"they should not be equal because the 'B' member on ValueObjectA is different among them"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
new ValueObjectA(a: 1, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(a: 2, b: "3")),
|
||||||
|
new ValueObjectA(a: 1, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(a: 3, b: "3")),
|
||||||
|
"they should not be equal because the 'A' member on ValueObjectA's 'D' member is different among them"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
new ValueObjectA(a: 1, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(a: 2, b: "3")),
|
||||||
|
new ValueObjectB(a: 1, b: "2"),
|
||||||
|
"they should not be equal because they are not of the same type"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
new ValueObjectB(1, "2", 1, 2, 3 ),
|
||||||
|
new ValueObjectB(1, "2", 1, 2, 3, 4 ),
|
||||||
|
"they should be not be equal because the 'C' list contains one additional value"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
new ValueObjectB(1, "2", 1, 2, 3, 5 ),
|
||||||
|
new ValueObjectB(1, "2", 1, 2, 3 ),
|
||||||
|
"they should be not be equal because the 'C' list contains one additional value"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
new ValueObjectB(1, "2", 1, 2, 3, 5 ),
|
||||||
|
new ValueObjectB(1, "2", 1, 2, 3, 4 ),
|
||||||
|
"they should be not be equal because the 'C' lists are not equal"
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
private class ValueObjectA : ValueObject
|
||||||
|
{
|
||||||
|
public ValueObjectA(int a, string b, Guid c, ComplexObject d, string notAnEqualityComponent = null)
|
||||||
|
{
|
||||||
|
A = a;
|
||||||
|
B = b;
|
||||||
|
C = c;
|
||||||
|
D = d;
|
||||||
|
NotAnEqualityComponent = notAnEqualityComponent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int A { get; }
|
||||||
|
public string B { get; }
|
||||||
|
public Guid C { get; }
|
||||||
|
public ComplexObject D { get; }
|
||||||
|
public string NotAnEqualityComponent { get; }
|
||||||
|
|
||||||
|
protected override IEnumerable<object> GetEqualityComponents()
|
||||||
|
{
|
||||||
|
yield return A;
|
||||||
|
yield return B;
|
||||||
|
yield return C;
|
||||||
|
yield return D;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ValueObjectB : ValueObject
|
||||||
|
{
|
||||||
|
public ValueObjectB(int a, string b, params int[] c)
|
||||||
|
{
|
||||||
|
A = a;
|
||||||
|
B = b;
|
||||||
|
C = c.ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int A { get; }
|
||||||
|
public string B { get; }
|
||||||
|
|
||||||
|
public List<int> C { get; }
|
||||||
|
|
||||||
|
protected override IEnumerable<object> GetEqualityComponents()
|
||||||
|
{
|
||||||
|
yield return A;
|
||||||
|
yield return B;
|
||||||
|
|
||||||
|
foreach (var c in C)
|
||||||
|
{
|
||||||
|
yield return c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ComplexObject : IEquatable<ComplexObject>
|
||||||
|
{
|
||||||
|
public ComplexObject(int a, string b)
|
||||||
|
{
|
||||||
|
A = a;
|
||||||
|
B = b;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int A { get; set; }
|
||||||
|
|
||||||
|
public string B { get; set; }
|
||||||
|
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
return Equals(obj as ComplexObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Equals(ComplexObject other)
|
||||||
|
{
|
||||||
|
return other != null &&
|
||||||
|
A == other.A &&
|
||||||
|
B == other.B;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
return HashCode.Combine(A, B);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -16,6 +16,7 @@ namespace FunctionalTests.Services.Basket
|
|||||||
if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant())
|
if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant())
|
||||||
{
|
{
|
||||||
app.UseMiddleware<AutoAuthorizeMiddleware>();
|
app.UseMiddleware<AutoAuthorizeMiddleware>();
|
||||||
|
app.UseAuthorization();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant())
|
if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant())
|
||||||
{
|
{
|
||||||
app.UseMiddleware<LocationAuthorizeMiddleware>();
|
app.UseMiddleware<LocationAuthorizeMiddleware>();
|
||||||
|
app.UseAuthorization();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant())
|
if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant())
|
||||||
{
|
{
|
||||||
app.UseMiddleware<AutoAuthorizeMiddleware>();
|
app.UseMiddleware<AutoAuthorizeMiddleware>();
|
||||||
|
app.UseAuthorization();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
{
|
{
|
||||||
|
"AzureServiceBusEnabled": false,
|
||||||
"ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word",
|
"ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word",
|
||||||
"MongoConnectionString": "mongodb://localhost:27017",
|
"EventBusConnection": "localhost",
|
||||||
"MongoDatabase": "MarketingDb",
|
|
||||||
"IdentityUrl": "http://localhost:5105",
|
"IdentityUrl": "http://localhost:5105",
|
||||||
"isTest": "true",
|
"isTest": "true",
|
||||||
"EventBusConnection": "localhost",
|
"MongoConnectionString": "mongodb://localhost:27017",
|
||||||
"AzureServiceBusEnabled": false,
|
"MongoDatabase": "MarketingDb",
|
||||||
"SubscriptionClientName": "Marketing",
|
|
||||||
"PicBaseUrl": "http://localhost:5110/api/v1/campaigns/[0]/pic/",
|
"PicBaseUrl": "http://localhost:5110/api/v1/campaigns/[0]/pic/",
|
||||||
"SubscriptionClientName": "Marketing"
|
"SubscriptionClientName": "Marketing"
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
||||||
{
|
{
|
||||||
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
|
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
|
||||||
public class AccountController : Controller
|
public class AccountController : Controller
|
||||||
{
|
{
|
||||||
private readonly ILogger<AccountController> _logger;
|
private readonly ILogger<AccountController> _logger;
|
||||||
@ -20,7 +20,8 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
|||||||
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Authorize(AuthenticationSchemes = "OpenIdConnect")] public async Task<IActionResult> SignIn(string returnUrl)
|
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
|
||||||
|
public async Task<IActionResult> SignIn(string returnUrl)
|
||||||
{
|
{
|
||||||
var user = User as ClaimsPrincipal;
|
var user = User as ClaimsPrincipal;
|
||||||
var token = await HttpContext.GetTokenAsync("access_token");
|
var token = await HttpContext.GetTokenAsync("access_token");
|
||||||
|
@ -11,8 +11,9 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using ViewModels;
|
using ViewModels;
|
||||||
using ViewModels.Pagination;
|
using ViewModels.Pagination;
|
||||||
|
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
|
||||||
|
|
||||||
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
|
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
|
||||||
public class CampaignsController : Controller
|
public class CampaignsController : Controller
|
||||||
{
|
{
|
||||||
private readonly ICampaignService _campaignService;
|
private readonly ICampaignService _campaignService;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.eShopOnContainers.WebMVC.Services;
|
using Microsoft.eShopOnContainers.WebMVC.Services;
|
||||||
@ -8,7 +9,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
||||||
{
|
{
|
||||||
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
|
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
|
||||||
public class CartController : Controller
|
public class CartController : Controller
|
||||||
{
|
{
|
||||||
private readonly IBasketService _basketSvc;
|
private readonly IBasketService _basketSvc;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.eShopOnContainers.WebMVC.Services;
|
using Microsoft.eShopOnContainers.WebMVC.Services;
|
||||||
@ -7,7 +8,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
||||||
{
|
{
|
||||||
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
|
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
|
||||||
public class OrderController : Controller
|
public class OrderController : Controller
|
||||||
{
|
{
|
||||||
private IOrderingService _orderSvc;
|
private IOrderingService _orderSvc;
|
||||||
|
@ -7,10 +7,11 @@ using WebMVC.Services.ModelDTOs;
|
|||||||
using Microsoft.eShopOnContainers.WebMVC.Services;
|
using Microsoft.eShopOnContainers.WebMVC.Services;
|
||||||
using Microsoft.eShopOnContainers.WebMVC.ViewModels;
|
using Microsoft.eShopOnContainers.WebMVC.ViewModels;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
|
||||||
|
|
||||||
namespace WebMVC.Controllers
|
namespace WebMVC.Controllers
|
||||||
{
|
{
|
||||||
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
|
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
|
||||||
public class OrderManagementController : Controller
|
public class OrderManagementController : Controller
|
||||||
{
|
{
|
||||||
private IOrderingService _orderSvc;
|
private IOrderingService _orderSvc;
|
||||||
|
@ -23,7 +23,7 @@ namespace WebMVC.Services
|
|||||||
_settings = settings;
|
_settings = settings;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
|
|
||||||
_remoteServiceBaseUrl = $"{_settings.Value.MarketingUrl}/api/v1/l/locations/";
|
_remoteServiceBaseUrl = $"{_settings.Value.MarketingUrl}/l/api/v1/locations/";
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task CreateOrUpdateUserLocation(LocationDTO location)
|
public async Task CreateOrUpdateUserLocation(LocationDTO location)
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"provider": "unpkg",
|
"provider": "unpkg",
|
||||||
"library": "@microsoft/signalr@3.0.1",
|
"library": "@microsoft/signalr@latest",
|
||||||
"destination": "wwwroot/lib/@microsoft/signalr/",
|
"destination": "wwwroot/lib/@microsoft/signalr/",
|
||||||
"files": [
|
"files": [
|
||||||
"dist/browser/signalr.js",
|
"dist/browser/signalr.js",
|
||||||
|
48
src/Web/WebSPA/package-lock.json
generated
48
src/Web/WebSPA/package-lock.json
generated
@ -1236,10 +1236,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node-forge": {
|
"node-forge": {
|
||||||
"version": "0.9.0",
|
"version": "0.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz",
|
||||||
"integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==",
|
"integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node-libs-browser": {
|
"node-libs-browser": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
@ -1863,8 +1862,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"yargs-parser": {
|
"yargs-parser": {
|
||||||
"version": "11.1.1",
|
"version": "13.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
|
||||||
"integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==",
|
"integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -2943,9 +2942,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"yargs-parser": {
|
"yargs-parser": {
|
||||||
"version": "13.1.1",
|
"version": "13.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
|
||||||
"integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==",
|
"integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"camelcase": "^5.0.0",
|
"camelcase": "^5.0.0",
|
||||||
@ -8541,13 +8540,20 @@
|
|||||||
"integrity": "sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w=="
|
"integrity": "sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w=="
|
||||||
},
|
},
|
||||||
"http-proxy": {
|
"http-proxy": {
|
||||||
"version": "1.17.0",
|
"version": "1.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
|
||||||
"integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==",
|
"integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"eventemitter3": "^3.0.0",
|
"eventemitter3": "^4.0.0",
|
||||||
"follow-redirects": "^1.0.0",
|
"follow-redirects": "^1.0.0",
|
||||||
"requires-port": "^1.0.0"
|
"requires-port": "^1.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"eventemitter3": {
|
||||||
|
"version": "4.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
|
||||||
|
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"http-proxy-agent": {
|
"http-proxy-agent": {
|
||||||
@ -10381,8 +10387,8 @@
|
|||||||
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
|
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
|
||||||
},
|
},
|
||||||
"node-fetch": {
|
"node-fetch": {
|
||||||
"version": "1.7.3",
|
"version": "2.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
||||||
"integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==",
|
"integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"encoding": "^0.1.11",
|
"encoding": "^0.1.11",
|
||||||
@ -10401,9 +10407,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node-forge": {
|
"node-forge": {
|
||||||
"version": "0.7.5",
|
"version": "0.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz",
|
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz",
|
||||||
"integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ=="
|
"integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA=="
|
||||||
},
|
},
|
||||||
"node-libs-browser": {
|
"node-libs-browser": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
@ -17255,9 +17261,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"yargs-parser": {
|
"yargs-parser": {
|
||||||
"version": "10.1.0",
|
"version": "13.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
|
||||||
"integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
|
"integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"camelcase": "^4.1.0"
|
"camelcase": "^4.1.0"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user