Merge
This commit is contained in:
commit
faea50f715
@ -162,7 +162,9 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
|
||||
{
|
||||
app.UseStaticFiles();
|
||||
app.UseCors("CorsPolicy");
|
||||
|
||||
ConfigureAuth(app);
|
||||
|
||||
app.UseMvcWithDefaultRoute();
|
||||
|
||||
app.UseSwagger()
|
||||
@ -235,5 +237,10 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
|
||||
eventBus.Subscribe<ProductPriceChangedIntegrationEvent, ProductPriceChangedIntegrationEventHandler>();
|
||||
eventBus.Subscribe<OrderStartedIntegrationEvent, OrderStartedIntegrationEventHandler>();
|
||||
}
|
||||
|
||||
protected virtual void ConfigureAuth(IApplicationBuilder app)
|
||||
{
|
||||
app.UseAuthentication();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -190,5 +190,10 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
|
||||
|
||||
services.AddSingleton<IEventBusSubscriptionsManager, InMemoryEventBusSubscriptionsManager>();
|
||||
}
|
||||
|
||||
protected virtual void ConfigureAuth(IApplicationBuilder app)
|
||||
{
|
||||
app.UseAuthentication();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -257,5 +257,10 @@
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
protected virtual void ConfigureAuth(IApplicationBuilder app)
|
||||
{
|
||||
app.UseAuthentication();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
|
||||
<!--<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>-->
|
||||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
||||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
|
||||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
|
||||
@ -45,9 +45,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.DotNet.InternalAbstractions" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="1.1.2" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.0.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
|
@ -8,7 +8,7 @@ namespace FunctionalTests.Services.Basket
|
||||
{
|
||||
public class BasketTestsStartup : Startup
|
||||
{
|
||||
public BasketTestsStartup(IConfiguration env) : base(env)
|
||||
public BasketTestsStartup(IConfiguration configuration) : base(configuration)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
public class LocationsTestsStartup : Startup
|
||||
{
|
||||
public LocationsTestsStartup(IConfiguration env) : base(env)
|
||||
public LocationsTestsStartup(IConfiguration configuration) : base(configuration)
|
||||
{
|
||||
}
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
class LocationAuthorizeMiddleware
|
||||
{
|
||||
private readonly RequestDelegate _next;
|
||||
|
||||
public LocationAuthorizeMiddleware(RequestDelegate rd)
|
||||
{
|
||||
_next = rd;
|
||||
@ -39,6 +40,7 @@
|
||||
var identity = new ClaimsIdentity("cookies");
|
||||
identity.AddClaim(new Claim("sub", "4611ce3f-380d-4db5-8d76-87a8689058ed"));
|
||||
httpContext.User.AddIdentity(identity);
|
||||
|
||||
await _next.Invoke(httpContext);
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,13 @@
|
||||
namespace FunctionalTests.Services.Marketing
|
||||
{
|
||||
using Microsoft.eShopOnContainers.Services.Marketing.API;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using FunctionalTests.Middleware;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.eShopOnContainers.Services.Marketing.API;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
public class MarketingTestsStartup : Startup
|
||||
{
|
||||
public MarketingTestsStartup(IConfiguration env) : base(env)
|
||||
public MarketingTestsStartup(IConfiguration configuration) : base(configuration)
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user