diff --git a/src/Antiforgery/src/AntiforgeryOptions.cs b/src/Antiforgery/src/AntiforgeryOptions.cs
index e58f3f73c7..36906cf475 100644
--- a/src/Antiforgery/src/AntiforgeryOptions.cs
+++ b/src/Antiforgery/src/AntiforgeryOptions.cs
@@ -82,69 +82,5 @@ namespace Microsoft.AspNetCore.Antiforgery
/// the X-Frame-Options header will not be generated for the response.
///
public bool SuppressXFrameOptionsHeader { get; set; }
-
- #region Obsolete API
- ///
- ///
- /// This property is obsolete and will be removed in a future version. The recommended alternative is on .
- ///
- ///
- /// Specifies the name of the cookie that is used by the antiforgery system.
- ///
- ///
- ///
- /// If an explicit name is not provided, the system will automatically generate a
- /// unique name that begins with .
- ///
- [Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is " + nameof(Cookie) + "." + nameof(CookieBuilder.Name) + ".")]
- public string CookieName { get => Cookie.Name; set => Cookie.Name = value; }
-
- ///
- ///
- /// This property is obsolete and will be removed in a future version. The recommended alternative is on .
- ///
- ///
- /// The path set on the cookie. If set to null, the "path" attribute on the cookie is set to the current
- /// request's value. If the value of is
- /// null or empty, then the "path" attribute is set to the value of .
- ///
- ///
- [Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is " + nameof(Cookie) + "." + nameof(CookieBuilder.Path) + ".")]
- public PathString? CookiePath { get => Cookie.Path; set => Cookie.Path = value; }
-
- ///
- ///
- /// This property is obsolete and will be removed in a future version. The recommended alternative is on .
- ///
- ///
- /// The domain set on the cookie. By default its null which results in the "domain" attribute not being set.
- ///
- ///
- [Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is " + nameof(Cookie) + "." + nameof(CookieBuilder.Domain) + ".")]
- public string CookieDomain { get => Cookie.Domain; set => Cookie.Domain = value; }
-
-
- ///
- ///
- /// This property is obsolete and will be removed in a future version.
- /// The recommended alternative is to set on .
- ///
- ///
- /// true is equivalent to .
- /// false is equivalent to .
- ///
- ///
- /// Specifies whether SSL is required for the antiforgery system
- /// to operate. If this setting is 'true' and a non-SSL request
- /// comes into the system, all antiforgery APIs will fail.
- ///
- ///
- [Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is to set " + nameof(Cookie) + "." + nameof(CookieBuilder.SecurePolicy) + ".")]
- public bool RequireSsl
- {
- get => Cookie.SecurePolicy == CookieSecurePolicy.Always;
- set => Cookie.SecurePolicy = value ? CookieSecurePolicy.Always : CookieSecurePolicy.None;
- }
- #endregion
}
}
diff --git a/src/Antiforgery/test/Internal/DefaultAntiforgeryTest.cs b/src/Antiforgery/test/Internal/DefaultAntiforgeryTest.cs
index faf895d524..63ee690f35 100644
--- a/src/Antiforgery/test/Internal/DefaultAntiforgeryTest.cs
+++ b/src/Antiforgery/test/Internal/DefaultAntiforgeryTest.cs
@@ -31,10 +31,10 @@ namespace Microsoft.AspNetCore.Antiforgery.Internal
var httpContext = GetHttpContext();
var options = new AntiforgeryOptions
{
-#pragma warning disable CS0618
- // obsolete property still forwards to correctly to the new API
- RequireSsl = true
-#pragma warning restore CS0618
+ Cookie = new CookieBuilder
+ {
+ SecurePolicy = CookieSecurePolicy.Always
+ }
};
var antiforgery = GetAntiforgery(httpContext, options);
diff --git a/src/Components/Components/src/Json/JsonUtil.cs b/src/Components/Components/src/Json/JsonUtil.cs
deleted file mode 100644
index ae565b12ba..0000000000
--- a/src/Components/Components/src/Json/JsonUtil.cs
+++ /dev/null
@@ -1,34 +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 Microsoft.JSInterop;
-using System;
-
-namespace Microsoft.AspNetCore.Components
-{
- ///
- /// Provides mechanisms for converting between .NET objects and JSON strings.
- ///
- [Obsolete("Use Microsoft.JSInterop.Json instead.")]
- public static class JsonUtil
- {
- ///
- /// Serializes the value as a JSON string.
- ///
- /// The value to serialize.
- /// The JSON string.
- [Obsolete("Use Microsoft.JSInterop.Json.Serialize instead.")]
- public static string Serialize(object value)
- => Json.Serialize(value);
-
- ///
- /// Deserializes the JSON string, creating an object of the specified generic type.
- ///
- /// The type of object to create.
- /// The JSON string.
- /// An object of the specified type.
- [Obsolete("Use Microsoft.JSInterop.Json.Deserialize instead.")]
- public static T Deserialize(string json)
- => Json.Deserialize(json);
- }
-}
diff --git a/src/Middleware/CORS/src/Infrastructure/CorsService.cs b/src/Middleware/CORS/src/Infrastructure/CorsService.cs
index 16670add2c..bf8d03e359 100644
--- a/src/Middleware/CORS/src/Infrastructure/CorsService.cs
+++ b/src/Middleware/CORS/src/Infrastructure/CorsService.cs
@@ -22,16 +22,6 @@ namespace Microsoft.AspNetCore.Cors.Infrastructure
private readonly CorsOptions _options;
private readonly ILogger _logger;
- ///
- /// Creates a new instance of the .
- ///
- /// The option model representing .
- [Obsolete("This constructor is obsolete and will be removed in a future version.")]
- public CorsService(IOptions options)
- : this(options, loggerFactory: NullLoggerFactory.Instance)
- {
- }
-
///
/// Creates a new instance of the .
///