From 2b259e8b99e519946cbd782da20398a426c2a9d7 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Tue, 20 Oct 2015 13:56:40 -0700 Subject: [PATCH] Remove deprecated AddCookieAuthentication methods --- .../CookieServiceCollectionExtensions.cs | 57 ------------------- 1 file changed, 57 deletions(-) delete mode 100644 src/Microsoft.AspNet.Authentication.Cookies/CookieServiceCollectionExtensions.cs diff --git a/src/Microsoft.AspNet.Authentication.Cookies/CookieServiceCollectionExtensions.cs b/src/Microsoft.AspNet.Authentication.Cookies/CookieServiceCollectionExtensions.cs deleted file mode 100644 index 00132beac2..0000000000 --- a/src/Microsoft.AspNet.Authentication.Cookies/CookieServiceCollectionExtensions.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using Microsoft.AspNet.Authentication.Cookies; -using Microsoft.Extensions.Configuration; - -namespace Microsoft.Extensions.DependencyInjection -{ - /// - /// Extension methods for setting up cookie authentication services in an . - /// - public static class CookieServiceCollectionExtensions - { - /// - /// Adds cookie authentication services to the specified . - /// - /// The to add services to. - /// An action delegate to configure the provided . - /// A reference to this instance after the operation has completed. - public static IServiceCollection AddCookieAuthentication(this IServiceCollection services, Action configure) - { - if (services == null) - { - throw new ArgumentNullException(nameof(services)); - } - - if (configure == null) - { - throw new ArgumentNullException(nameof(configure)); - } - - return services.Configure(configure); - } - - /// - /// Adds cookie authentication services to the specified . - /// - /// The to add services to. - /// An instance that contains configuration data representing a . - /// A reference to this instance after the operation has completed. - public static IServiceCollection AddCookieAuthentication(this IServiceCollection services, IConfiguration config) - { - if (services == null) - { - throw new ArgumentNullException(nameof(services)); - } - - if (config == null) - { - throw new ArgumentNullException(nameof(config)); - } - - return services.Configure(config); - } - } -}