You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
782 B

  1. using Microsoft.eShopOnContainers.Services.Basket.API;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. using Microsoft.AspNetCore.Hosting;
  6. using Microsoft.AspNetCore.Builder;
  7. using FunctionalTests.Middleware;
  8. namespace FunctionalTests.Services.Basket
  9. {
  10. public class BasketTestsStartup : Startup
  11. {
  12. public BasketTestsStartup(IHostingEnvironment env) : base(env)
  13. {
  14. }
  15. protected override void ConfigureAuth(IApplicationBuilder app)
  16. {
  17. if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant())
  18. {
  19. app.UseMiddleware<AutoAuthorizeMiddleware>();
  20. }
  21. else
  22. {
  23. base.ConfigureAuth(app);
  24. }
  25. }
  26. }
  27. }