From a71dc5858db6d3345793619f295f0de57d5e52e5 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 23 Apr 2015 22:57:17 -0700 Subject: [PATCH] React to Security changes --- .../IdentityServiceCollectionExtensions.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.AspNet.Identity/IdentityServiceCollectionExtensions.cs b/src/Microsoft.AspNet.Identity/IdentityServiceCollectionExtensions.cs index 2b5c2ac8b5..003ee38bc1 100644 --- a/src/Microsoft.AspNet.Identity/IdentityServiceCollectionExtensions.cs +++ b/src/Microsoft.AspNet.Identity/IdentityServiceCollectionExtensions.cs @@ -44,7 +44,7 @@ namespace Microsoft.Framework.DependencyInjection { // Services used by identity services.AddOptions(); - services.AddDataProtection(); + services.AddAuthentication(); // Identity services services.TryAdd(ServiceDescriptor.Transient, UserValidator>()); @@ -81,18 +81,18 @@ namespace Microsoft.Framework.DependencyInjection }; }); - services.Configure(options => + services.ConfigureCookieAuthentication(options => { options.AuthenticationScheme = IdentityOptions.ExternalCookieAuthenticationScheme; options.CookieName = IdentityOptions.ExternalCookieAuthenticationScheme; options.ExpireTimeSpan = TimeSpan.FromMinutes(5); }, IdentityOptions.ExternalCookieAuthenticationScheme); - services.Configure(options => + services.ConfigureCookieAuthentication(options => { options.AuthenticationScheme = IdentityOptions.TwoFactorRememberMeCookieAuthenticationScheme; options.CookieName = IdentityOptions.TwoFactorRememberMeCookieAuthenticationScheme; }, IdentityOptions.TwoFactorRememberMeCookieAuthenticationScheme); - services.Configure(options => + services.ConfigureCookieAuthentication(options => { options.AuthenticationScheme = IdentityOptions.TwoFactorUserIdCookieAuthenticationScheme; options.CookieName = IdentityOptions.TwoFactorUserIdCookieAuthenticationScheme;