React to Identity changes

This commit is contained in:
Hao Kung 2014-07-23 12:36:21 -07:00
parent b440d4ff66
commit fe30a0418e
2 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@ namespace MusicStore.Spa
// Add Identity services to the service container
services.AddIdentitySqlServer<ApplicationDbContext, ApplicationUser>()
.AddHttpSignIn();
.AddAuthentication();
// Add application services to the service container
services.AddScoped<MusicStoreContext>();
@ -60,7 +60,7 @@ namespace MusicStore.Spa
// Add cookie auth
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
AuthenticationType = ClaimsIdentityOptions.DefaultAuthenticationType,
LoginPath = new PathString("/Account/Login")
});

View File

@ -60,7 +60,7 @@ namespace MusicStore
// Add Identity services to the services container
services.AddIdentitySqlServer<MusicStoreContext, ApplicationUser>()
.AddHttpSignIn();
.AddAuthentication();
// Add MVC services to the services container
services.AddMvc();
@ -77,7 +77,7 @@ namespace MusicStore
// Add cookie-based authentication to the request pipeline
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
AuthenticationType = ClaimsIdentityOptions.DefaultAuthenticationType,
LoginPath = new PathString("/Account/Login"),
});