React to defaults

This commit is contained in:
Hao Kung 2017-07-07 14:00:32 -07:00
parent dc45279082
commit 55d7cd2286
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
@ -10,7 +11,7 @@ namespace RazorPagesApp
public void ConfigureServices(IServiceCollection services)
{
var builder = services.AddMvc();
services.AddAuthentication().AddCookie(options => options.LoginPath = "/Login");
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options => options.LoginPath = "/Login");
ConfigureMvc(builder);
}