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

View File

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