Skip to content

Commit

Permalink
Merge pull request auth0-samples#41 from alexisluque/alexisluque-patch-1
Browse files Browse the repository at this point in the history
Update CircleCI tests
  • Loading branch information
jerriep authored Aug 13, 2018
2 parents 564ddeb + 0f54d76 commit 801e882
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
machine: true
steps:
- checkout
- run: git clone -b refactor-for-dotnetcore https://github.com/alexisluque/spa-quickstarts-tests scripts
- run: git clone https://github.com/auth0-samples/spa-quickstarts-tests scripts
- persist_to_workspace:
root: ~/
paths:
Expand Down
6 changes: 4 additions & 2 deletions Quickstart/01-Login/SampleMvcApp/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,22 @@ namespace SampleMvcApp
{
public class Startup
{
public Startup(IConfiguration configuration)
public Startup(IConfiguration configuration, IHostingEnvironment hostingEnvironment)
{
Configuration = configuration;
HostingEnvironment = hostingEnvironment;
}

public IConfiguration Configuration { get; }
public IHostingEnvironment HostingEnvironment { get; }

// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.Configure<CookiePolicyOptions>(options =>
{
// This lambda determines whether user consent for non-essential cookies is needed for a given request.
options.CheckConsentNeeded = context => true;
options.CheckConsentNeeded = context => HostingEnvironment.IsProduction();
options.MinimumSameSitePolicy = SameSiteMode.None;
});

Expand Down
8 changes: 5 additions & 3 deletions Quickstart/02-User-Profile/SampleMvcApp/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@ namespace SampleMvcApp
{
public class Startup
{
public Startup(IConfiguration configuration)
public Startup(IConfiguration configuration, IHostingEnvironment hostingEnvironment)
{
Configuration = configuration;
HostingEnvironment = hostingEnvironment;
}

public IConfiguration Configuration { get; }
public IHostingEnvironment HostingEnvironment { get; }

// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.Configure<CookiePolicyOptions>(options =>
{
// This lambda determines whether user consent for non-essential cookies is needed for a given request.
options.CheckConsentNeeded = context => true;
options.CheckConsentNeeded = context => HostingEnvironment.IsProduction();
options.MinimumSameSitePolicy = SameSiteMode.None;
});

Expand Down Expand Up @@ -130,4 +132,4 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
});
}
}
}
}
8 changes: 5 additions & 3 deletions Quickstart/03-Authorization/SampleMvcApp/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@ namespace SampleMvcApp
{
public class Startup
{
public Startup(IConfiguration configuration)
public Startup(IConfiguration configuration, IHostingEnvironment hostingEnvironment)
{
Configuration = configuration;
HostingEnvironment = hostingEnvironment;
}

public IConfiguration Configuration { get; }
public IHostingEnvironment HostingEnvironment { get; }

// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.Configure<CookiePolicyOptions>(options =>
{
// This lambda determines whether user consent for non-essential cookies is needed for a given request.
options.CheckConsentNeeded = context => true;
options.CheckConsentNeeded = context => HostingEnvironment.IsProduction();
options.MinimumSameSitePolicy = SameSiteMode.None;
});

Expand Down Expand Up @@ -131,4 +133,4 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
});
}
}
}
}

0 comments on commit 801e882

Please sign in to comment.