2018-06-25 11:36:42 +02:00
|
|
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
|
using Microsoft.eShopOnContainers.Services.Ordering.API;
|
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
|
2018-06-27 15:57:37 +02:00
|
|
|
|
namespace Ordering.FunctionalTests
|
2018-06-25 11:36:42 +02:00
|
|
|
|
{
|
|
|
|
|
public class OrderingTestsStartup : Startup
|
|
|
|
|
{
|
|
|
|
|
public OrderingTestsStartup(IConfiguration env) : base(env)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void ConfigureAuth(IApplicationBuilder app)
|
|
|
|
|
{
|
|
|
|
|
if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant())
|
|
|
|
|
{
|
|
|
|
|
app.UseMiddleware<AutoAuthorizeMiddleware>();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
base.ConfigureAuth(app);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|