renaming of PurchaseBff to Aggregator
This commit is contained in:
parent
0be655d2e0
commit
6cc87fc80a
@ -57,7 +57,7 @@ services:
|
||||
- MarketingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110
|
||||
- BasketApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103
|
||||
- OrderingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102
|
||||
- PurchaseBFFClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5120
|
||||
- MobileShoppingAggClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5120
|
||||
- UseCustomizationData=True
|
||||
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
||||
@ -132,7 +132,7 @@ services:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Development
|
||||
- ASPNETCORE_URLS=http://0.0.0.0:80
|
||||
- PurchaseUrl=http://apigw/purchase-bff
|
||||
- PurchaseUrl=http://apigw/shopping
|
||||
- LocationsUrl=http://locations.api
|
||||
- IdentityUrl=http://10.0.75.1:5105 # Local Mac: Use http://docker.for.mac.localhost:5105 || Local Windows: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. || #Remote access: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser.
|
||||
- MarketingUrl=http://marketing.api
|
||||
@ -225,7 +225,7 @@ services:
|
||||
ports:
|
||||
- "5200:80"
|
||||
|
||||
purchasebff:
|
||||
mobileshoppingagg:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Development
|
||||
- urls__basket=http://basket.api
|
||||
|
@ -64,7 +64,7 @@ services:
|
||||
- MarketingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110
|
||||
- BasketApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103
|
||||
- OrderingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102
|
||||
- PurchaseBFFClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5120
|
||||
- MobileShoppingAggClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5120
|
||||
- UseCustomizationData=True
|
||||
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
||||
|
@ -114,9 +114,9 @@ services:
|
||||
context: .
|
||||
dockerfile: src/Apigw/OcelotApiGw/Dockerfile
|
||||
|
||||
purchasebff:
|
||||
image: eshop/purchasebff
|
||||
mobileshoppingagg:
|
||||
image: eshop/mobileshoppingagg
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/BFFs/PurchaseBff/Dockerfile
|
||||
dockerfile: src/Aggregators/Mobile.Shopping.HttpAggregator/Dockerfile
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27004.2009
|
||||
VisualStudioVersion = 15.0.27130.2027
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{FEA0C318-FFED-4D39-8781-265718CA43DD}"
|
||||
EndProject
|
||||
@ -101,9 +101,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ApiGw", "ApiGw", "{7A58AA20
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OcelotApiGw", "src\Apigw\OcelotApiGw\OcelotApiGw.csproj", "{E0C5162E-DF26-4341-9E51-14AE800D7505}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BFFs", "BFFs", "{EA378316-9D49-4A6B-858E-D4A25F948A74}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Aggregators", "Aggregators", "{EA378316-9D49-4A6B-858E-D4A25F948A74}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PurchaseBff", "src\BFFs\PurchaseBff\PurchaseBff.csproj", "{F77054A6-5808-45D7-88EB-CD92B3FDB889}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mobile.Shopping.HttpAggregator", "src\Aggregators\Mobile.Shopping.HttpAggregator\Mobile.Shopping.HttpAggregator.csproj", "{6E99F232-1536-424F-A28C-91692C8FD325}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -1367,54 +1367,54 @@ Global
|
||||
{E0C5162E-DF26-4341-9E51-14AE800D7505}.Release|x64.Build.0 = Release|Any CPU
|
||||
{E0C5162E-DF26-4341-9E51-14AE800D7505}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{E0C5162E-DF26-4341-9E51-14AE800D7505}.Release|x86.Build.0 = Release|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.AppStore|ARM.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.AppStore|x64.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.AppStore|x86.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Release|x64.Build.0 = Release|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889}.Release|x86.Build.0 = Release|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.AppStore|ARM.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.AppStore|x64.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.AppStore|x86.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Release|x64.Build.0 = Release|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -1464,7 +1464,7 @@ Global
|
||||
{7A58AA20-67F3-48F3-88C8-24EBFE621792} = {932D8224-11F6-4D07-B109-DA28AD288A63}
|
||||
{E0C5162E-DF26-4341-9E51-14AE800D7505} = {7A58AA20-67F3-48F3-88C8-24EBFE621792}
|
||||
{EA378316-9D49-4A6B-858E-D4A25F948A74} = {932D8224-11F6-4D07-B109-DA28AD288A63}
|
||||
{F77054A6-5808-45D7-88EB-CD92B3FDB889} = {EA378316-9D49-4A6B-858E-D4A25F948A74}
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325} = {EA378316-9D49-4A6B-858E-D4A25F948A74}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9}
|
||||
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PurchaseBff.Config
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config
|
||||
{
|
||||
public class UrlsConfig
|
||||
{
|
@ -1,13 +1,13 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using PurchaseBff.Models;
|
||||
using PurchaseBff.Services;
|
||||
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
|
||||
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PurchaseBff.Controllers
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Controllers
|
||||
{
|
||||
[Route("api/v1/[controller]")]
|
||||
[Authorize]
|
@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PurchaseBff.Controllers
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Controllers
|
||||
{
|
||||
[Route("")]
|
||||
public class HomeController : Controller
|
@ -1,12 +1,12 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using PurchaseBff.Services;
|
||||
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PurchaseBff.Controllers
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Controllers
|
||||
{
|
||||
[Route("api/v1/[controller]")]
|
||||
[Authorize]
|
@ -6,7 +6,7 @@ FROM microsoft/aspnetcore-build:2.0 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
WORKDIR /src/src/BFFs/PurchaseBff
|
||||
WORKDIR /src/src/Aggregators/Mobile.Shopping.HttpAggregator
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
@ -15,4 +15,4 @@ RUN dotnet publish --no-restore -c Release -o /app
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app .
|
||||
ENTRYPOINT ["dotnet", "PurchaseBff.dll"]
|
||||
ENTRYPOINT ["dotnet", "Mobile.Shopping.HttpAggregator.dll"]
|
@ -1,4 +1,4 @@
|
||||
namespace PurchaseBff.Filters
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Filters
|
||||
{
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Swashbuckle.AspNetCore.Swagger;
|
||||
@ -24,7 +24,7 @@
|
||||
operation.Security = new List<IDictionary<string, IEnumerable<string>>>();
|
||||
operation.Security.Add(new Dictionary<string, IEnumerable<string>>
|
||||
{
|
||||
{ "oauth2", new [] { "purchasebff" } }
|
||||
{ "oauth2", new [] { "Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator" } }
|
||||
});
|
||||
}
|
||||
}
|
@ -2,8 +2,8 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<AssemblyName>PurchaseBff</AssemblyName>
|
||||
<RootNamespace>PurchaseBff</RootNamespace>
|
||||
<AssemblyName>Mobile.Shopping.HttpAggregator</AssemblyName>
|
||||
<RootNamespace>Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator</RootNamespace>
|
||||
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
</PropertyGroup>
|
||||
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PurchaseBff.Models
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models
|
||||
{
|
||||
public class AddBasketItemRequest
|
||||
{
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PurchaseBff.Models
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models
|
||||
{
|
||||
public class BasketData
|
||||
{
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PurchaseBff.Models
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models
|
||||
{
|
||||
public class CatalogItem
|
||||
{
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PurchaseBff.Models
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models
|
||||
{
|
||||
public class OrderData
|
||||
{
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PurchaseBff.Models
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models
|
||||
{
|
||||
public class OrderItemData
|
||||
{
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PurchaseBff.Models
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models
|
||||
{
|
||||
public class UpdateBasketItemsRequest
|
||||
{
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PurchaseBff.Models
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models
|
||||
{
|
||||
public class UpdateBasketRequest
|
||||
{
|
@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace PurchaseBff
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
|
||||
{
|
||||
public class Program
|
||||
{
|
@ -8,10 +8,10 @@ using Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Newtonsoft.Json;
|
||||
using PurchaseBff.Config;
|
||||
using PurchaseBff.Models;
|
||||
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config;
|
||||
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
|
||||
|
||||
namespace PurchaseBff.Services
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services
|
||||
{
|
||||
public class BasketService : IBasketService
|
||||
{
|
@ -6,10 +6,10 @@ using Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Newtonsoft.Json;
|
||||
using PurchaseBff.Config;
|
||||
using PurchaseBff.Models;
|
||||
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config;
|
||||
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
|
||||
|
||||
namespace PurchaseBff.Services
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services
|
||||
{
|
||||
public class CatalogService : ICatalogService
|
||||
{
|
@ -1,10 +1,10 @@
|
||||
using PurchaseBff.Models;
|
||||
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PurchaseBff.Services
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services
|
||||
{
|
||||
public interface IBasketService
|
||||
{
|
@ -1,10 +1,10 @@
|
||||
using PurchaseBff.Models;
|
||||
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PurchaseBff.Services
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services
|
||||
{
|
||||
public interface ICatalogService
|
||||
{
|
@ -1,10 +1,10 @@
|
||||
using PurchaseBff.Models;
|
||||
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PurchaseBff.Services
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services
|
||||
{
|
||||
public interface IOrderApiClient
|
||||
{
|
@ -6,10 +6,10 @@ using Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Newtonsoft.Json;
|
||||
using PurchaseBff.Config;
|
||||
using PurchaseBff.Models;
|
||||
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config;
|
||||
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
|
||||
|
||||
namespace PurchaseBff.Services
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services
|
||||
{
|
||||
public class OrderApiClient : IOrderApiClient
|
||||
{
|
@ -12,12 +12,12 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using PurchaseBff.Config;
|
||||
using PurchaseBff.Filters.Basket.API.Infrastructure.Filters;
|
||||
using PurchaseBff.Services;
|
||||
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config;
|
||||
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Filters.Basket.API.Infrastructure.Filters;
|
||||
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services;
|
||||
using Swashbuckle.AspNetCore.Swagger;
|
||||
|
||||
namespace PurchaseBff
|
||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
@ -61,7 +61,7 @@ namespace PurchaseBff
|
||||
TokenUrl = $"{Configuration.GetValue<string>("IdentityUrlExternal")}/connect/token",
|
||||
Scopes = new Dictionary<string, string>()
|
||||
{
|
||||
{ "purchasebff", "Purchase BFF API Gateway" }
|
||||
{ "mobileshoppingagg", "Purchase BFF API Gateway" }
|
||||
}
|
||||
});
|
||||
|
||||
@ -89,7 +89,7 @@ namespace PurchaseBff
|
||||
{
|
||||
options.Authority = identityUrl;
|
||||
options.RequireHttpsMetadata = false;
|
||||
options.Audience = "purchasebff";
|
||||
options.Audience = "mobileshoppingagg";
|
||||
options.Events = new JwtBearerEvents()
|
||||
{
|
||||
OnAuthenticationFailed = async ctx =>
|
||||
@ -129,7 +129,7 @@ namespace PurchaseBff
|
||||
app.UseSwagger().UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Purchase BFF V1");
|
||||
c.ConfigureOAuth2("purchasebffwaggerui", "", "", "Purchase BFF Swagger UI");
|
||||
c.ConfigureOAuth2("Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregatorwaggerui", "", "", "Purchase BFF Swagger UI");
|
||||
});
|
||||
|
||||
|
@ -45,7 +45,7 @@ namespace OcelotApiGw
|
||||
x.RequireHttpsMetadata = false;
|
||||
x.TokenValidationParameters = new Microsoft.IdentityModel.Tokens.TokenValidationParameters()
|
||||
{
|
||||
ValidAudiences = new[] { "orders", "basket", "locations", "marketing", "purchasebff" }
|
||||
ValidAudiences = new[] { "orders", "basket", "locations", "marketing", "mobileshoppingagg" }
|
||||
};
|
||||
x.Events = new Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerEvents()
|
||||
{
|
||||
|
@ -9,7 +9,7 @@
|
||||
"Port": 80
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/purchase-bff/api/{version}/c/{everything}",
|
||||
"UpstreamPathTemplate": "/shopping/api/{version}/c/{everything}",
|
||||
"UpstreamHttpMethod": [ "GET" ]
|
||||
},
|
||||
{
|
||||
@ -21,7 +21,7 @@
|
||||
"Port": 80
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/purchase-bff/api/{version}/b/{everything}",
|
||||
"UpstreamPathTemplate": "/shopping/api/{version}/b/{everything}",
|
||||
"UpstreamHttpMethod": [],
|
||||
"AuthenticationOptions": {
|
||||
"AuthenticationProviderKey": "IdentityApiKey",
|
||||
@ -37,7 +37,7 @@
|
||||
"Port": 80
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/purchase-bff/api/{version}/o/{everything}",
|
||||
"UpstreamPathTemplate": "/shopping/api/{version}/o/{everything}",
|
||||
"UpstreamHttpMethod": [],
|
||||
"AuthenticationOptions": {
|
||||
"AuthenticationProviderKey": "IdentityApiKey",
|
||||
@ -49,11 +49,11 @@
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "purchasebff",
|
||||
"Host": "mobileshoppingagg",
|
||||
"Port": 80
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/purchase-bff/{everything}",
|
||||
"UpstreamPathTemplate": "/shopping/{everything}",
|
||||
"UpstreamHttpMethod": [ "POST", "PUT", "GET" ],
|
||||
"AuthenticationOptions": {
|
||||
"AuthenticationProviderKey": "IdentityApiKey",
|
||||
|
@ -3,7 +3,7 @@
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:53998/",
|
||||
"applicationUrl": "http://localhost:58017/",
|
||||
"sslPort": 0
|
||||
}
|
||||
},
|
||||
|
@ -15,7 +15,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
|
||||
new ApiResource("basket", "Basket Service"),
|
||||
new ApiResource("marketing", "Marketing Service"),
|
||||
new ApiResource("locations", "Locations Service"),
|
||||
new ApiResource("purchasebff", "Purchase BFF")
|
||||
new ApiResource("mobileshoppingagg", "Mobile Shopping Aggregator")
|
||||
};
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
|
||||
"basket",
|
||||
"locations",
|
||||
"marketing",
|
||||
"purchasebff"
|
||||
"mobileshoppingagg"
|
||||
}
|
||||
},
|
||||
new Client
|
||||
@ -81,7 +81,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
|
||||
"basket",
|
||||
"locations",
|
||||
"marketing",
|
||||
"purchasebff"
|
||||
"mobileshoppingagg"
|
||||
},
|
||||
//Allow requesting refresh tokens for long lived API access
|
||||
AllowOfflineAccess = true,
|
||||
@ -118,7 +118,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
|
||||
"basket",
|
||||
"locations",
|
||||
"marketing",
|
||||
"purchasebff"
|
||||
"mobileshoppingagg"
|
||||
},
|
||||
},
|
||||
new Client
|
||||
@ -151,7 +151,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
|
||||
"basket",
|
||||
"locations",
|
||||
"marketing",
|
||||
"purchasebff"
|
||||
"mobileshoppingagg"
|
||||
},
|
||||
},
|
||||
new Client
|
||||
@ -216,17 +216,17 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
|
||||
},
|
||||
new Client
|
||||
{
|
||||
ClientId = "purchasebffwaggerui",
|
||||
ClientName = "Purchase BFF Swagger UI",
|
||||
ClientId = "mobileshoppingaggswaggerui",
|
||||
ClientName = "Mobile Shopping Aggregattor Swagger UI",
|
||||
AllowedGrantTypes = GrantTypes.Implicit,
|
||||
AllowAccessTokensViaBrowser = true,
|
||||
|
||||
RedirectUris = { $"{clientsUrl["PurchaseBFF"]}/swagger/o2c.html" },
|
||||
PostLogoutRedirectUris = { $"{clientsUrl["PurchaseBFF"]}/swagger/" },
|
||||
RedirectUris = { $"{clientsUrl["MobileShoppingAgg"]}/swagger/o2c.html" },
|
||||
PostLogoutRedirectUris = { $"{clientsUrl["MobileShoppingAgg"]}/swagger/" },
|
||||
|
||||
AllowedScopes =
|
||||
{
|
||||
"purchasebff"
|
||||
"mobileshoppingagg"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Data
|
||||
clientUrls.Add("MarketingApi", configuration.GetValue<string>("MarketingApiClient"));
|
||||
clientUrls.Add("BasketApi", configuration.GetValue<string>("BasketApiClient"));
|
||||
clientUrls.Add("OrderingApi", configuration.GetValue<string>("OrderingApiClient"));
|
||||
clientUrls.Add("PurchaseBFF", configuration.GetValue<string>("PurchaseBFFClient"));
|
||||
clientUrls.Add("MobileShoppingAgg", configuration.GetValue<string>("MobileShoppingAggClient"));
|
||||
|
||||
if (!context.Clients.Any())
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ namespace WebMVC.Controllers
|
||||
|
||||
public async Task<IActionResult> Ocelot()
|
||||
{
|
||||
var url = "http://apigw/purchase-bff/api/v1/basket/items";
|
||||
var url = "http://apigw/shopping/api/v1/basket/items";
|
||||
var payload = new TestPayload()
|
||||
{
|
||||
CatalogItemId = 1,
|
||||
|
@ -130,7 +130,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
||||
options.Scope.Add("basket");
|
||||
options.Scope.Add("marketing");
|
||||
options.Scope.Add("locations");
|
||||
options.Scope.Add("purchasebff");
|
||||
options.Scope.Add("mobileshoppingagg");
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ export class BasketService {
|
||||
}
|
||||
|
||||
setBasket(basket): Observable<boolean> {
|
||||
let url = this.purchaseUrl + '/purchase-bff/api/v1/basket/';
|
||||
let url = this.purchaseUrl + '/shopping/api/v1/basket/';
|
||||
this.basket = basket;
|
||||
return this.service.post(url, basket).map((response: Response) => {
|
||||
return true;
|
||||
@ -74,7 +74,7 @@ export class BasketService {
|
||||
}
|
||||
|
||||
setBasketCheckout(basketCheckout): Observable<boolean> {
|
||||
let url = this.basketUrl + '/purchase-bff/api/v1/b/basket/checkout';
|
||||
let url = this.basketUrl + '/shopping/api/v1/b/basket/checkout';
|
||||
return this.service.postWithId(url, basketCheckout).map((response: Response) => {
|
||||
this.basketEvents.orderCreated();
|
||||
return true;
|
||||
@ -82,7 +82,7 @@ export class BasketService {
|
||||
}
|
||||
|
||||
getBasket(): Observable<IBasket> {
|
||||
let url = this.basketUrl + '/purchase-bff/api/v1/b/basket/' + this.basket.buyerId;
|
||||
let url = this.basketUrl + '/shopping/api/v1/b/basket/' + this.basket.buyerId;
|
||||
return this.service.get(url).map((response: Response) => {
|
||||
if (response.status === 204) {
|
||||
return null;
|
||||
|
@ -21,9 +21,9 @@ export class CatalogService {
|
||||
|
||||
constructor(private service: DataService, private configurationService: ConfigurationService) {
|
||||
this.configurationService.settingsLoaded$.subscribe(x => {
|
||||
this.catalogUrl = this.configurationService.serverSettings.purchaseUrl + '/purchase-bff/api/v1/c/catalog/items';
|
||||
this.brandUrl = this.configurationService.serverSettings.purchaseUrl + '/purchase-bff/api/v1/c/catalog/catalogbrands';
|
||||
this.typesUrl = this.configurationService.serverSettings.purchaseUrl + '/purchase-bff/api/v1/c/catalog/catalogtypes';
|
||||
this.catalogUrl = this.configurationService.serverSettings.purchaseUrl + '/shopping/api/v1/c/catalog/items';
|
||||
this.brandUrl = this.configurationService.serverSettings.purchaseUrl + '/shopping/api/v1/c/catalog/catalogbrands';
|
||||
this.typesUrl = this.configurationService.serverSettings.purchaseUrl + '/shopping/api/v1/c/catalog/catalogtypes';
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ export class OrdersService {
|
||||
}
|
||||
|
||||
getOrders(): Observable<IOrder[]> {
|
||||
let url = this.ordersUrl + '/purchase-bff/api/v1/o/orders';
|
||||
let url = this.ordersUrl + '/shopping/api/v1/o/orders';
|
||||
|
||||
return this.service.get(url).map((response: Response) => {
|
||||
return response.json();
|
||||
@ -37,7 +37,7 @@ export class OrdersService {
|
||||
}
|
||||
|
||||
getOrder(id: number): Observable<IOrderDetail> {
|
||||
let url = this.ordersUrl + '/purchase-bff/api/v1/o/orders/' + id;
|
||||
let url = this.ordersUrl + '/shopping/api/v1/o/orders/' + id;
|
||||
|
||||
return this.service.get(url).map((response: Response) => {
|
||||
return response.json();
|
||||
|
@ -82,7 +82,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 purchasebff';
|
||||
let scope = 'openid profile orders basket marketing locations mobileshoppingagg';
|
||||
let nonce = 'N' + Math.random() + '' + Date.now();
|
||||
let state = Date.now() + '' + Math.random();
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:64923/",
|
||||
"applicationUrl": "http://localhost:58018/",
|
||||
"sslPort": 0
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user