Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Commit

Permalink
React to auth default changes
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoK committed Jul 7, 2017
1 parent f1c4aa1 commit e09a0f5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion test/WebSites/RazorPagesWebSite/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.Extensions.DependencyInjection;

namespace RazorPagesWebSite
Expand All @@ -10,7 +11,7 @@ public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthentication().AddCookie(options => options.LoginPath = "/Login");
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options => options.LoginPath = "/Login");
services.AddMvc()
.AddCookieTempDataProvider()
.AddRazorPagesOptions(options =>
Expand Down
3 changes: 2 additions & 1 deletion test/WebSites/RazorPagesWebSite/StartupWithBasePath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.Extensions.DependencyInjection;

namespace RazorPagesWebSite
Expand All @@ -10,7 +11,7 @@ public class StartupWithBasePath
{
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthentication()
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie(options => options.LoginPath = "/Login");
services.AddMvc()
.AddCookieTempDataProvider()
Expand Down
3 changes: 2 additions & 1 deletion test/WebSites/SecurityWebSite/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.Extensions.DependencyInjection;

namespace SecurityWebSite
Expand All @@ -14,7 +15,7 @@ public void ConfigureServices(IServiceCollection services)
// Add framework services.
services.AddMvc();
services.AddAntiforgery();
services.AddAuthentication().AddCookie(options =>
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options =>
{
options.LoginPath = "/Home/Login";
options.LogoutPath = "/Home/Logout";
Expand Down

0 comments on commit e09a0f5

Please sign in to comment.