Use configure from cookies repo

This commit is contained in:
Suhas Joshi 2015-04-20 17:29:46 -07:00
parent 07d9e86450
commit b775e90b5b
1 changed files with 2 additions and 1 deletions

View File

@ -25,7 +25,7 @@ namespace Microsoft.Framework.DependencyInjection
public static IServiceCollection ConfigureIdentityApplicationCookie(this IServiceCollection services, Action<CookieAuthenticationOptions> configureOptions) public static IServiceCollection ConfigureIdentityApplicationCookie(this IServiceCollection services, Action<CookieAuthenticationOptions> configureOptions)
{ {
return services.Configure<CookieAuthenticationOptions>(configureOptions, IdentityOptions.ApplicationCookieAuthenticationScheme); return services.ConfigureCookieAuthentication(configureOptions, IdentityOptions.ApplicationCookieAuthenticationScheme);
} }
public static IdentityBuilder AddIdentity<TUser, TRole>( public static IdentityBuilder AddIdentity<TUser, TRole>(
@ -82,6 +82,7 @@ namespace Microsoft.Framework.DependencyInjection
OnValidatePrincipal = SecurityStampValidator.ValidatePrincipalAsync OnValidatePrincipal = SecurityStampValidator.ValidatePrincipalAsync
}; };
}); });
services.Configure<CookieAuthenticationOptions>(options => services.Configure<CookieAuthenticationOptions>(options =>
{ {
options.AuthenticationScheme = IdentityOptions.ExternalCookieAuthenticationScheme; options.AuthenticationScheme = IdentityOptions.ExternalCookieAuthenticationScheme;