Skip to content

Commit 6d2f248

Browse files
authored
Remove obsolete session apis (#4609)
* Remove obsolete session apis * Add breaking changes json updates
1 parent 49d5525 commit 6d2f248

File tree

3 files changed

+53
-61
lines changed

3 files changed

+53
-61
lines changed

src/Middleware/Session/src/SessionOptions.cs

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -43,66 +43,6 @@ public CookieBuilder Cookie
4343
/// </summary>
4444
public TimeSpan IOTimeout { get; set; } = TimeSpan.FromMinutes(1);
4545

46-
#region Obsolete API
47-
/// <summary>
48-
/// <para>
49-
/// This property is obsolete and will be removed in a future version. The recommended alternative is <seealso cref="CookieBuilder.Name"/> on <see cref="Cookie"/>.
50-
/// </para>
51-
/// <para>
52-
/// Determines the cookie name used to persist the session ID.
53-
/// </para>
54-
/// </summary>
55-
[Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is " + nameof(Cookie) + "." + nameof(CookieBuilder.Name) + ".")]
56-
public string CookieName { get => Cookie.Name; set => Cookie.Name = value; }
57-
58-
/// <summary>
59-
/// <para>
60-
/// This property is obsolete and will be removed in a future version. The recommended alternative is <seealso cref="CookieBuilder.Domain"/> on <see cref="Cookie"/>.
61-
/// </para>
62-
/// <para>
63-
/// Determines the domain used to create the cookie. Is not provided by default.
64-
/// </para>
65-
/// </summary>
66-
[Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is " + nameof(Cookie) + "." + nameof(CookieBuilder.Domain) + ".")]
67-
public string CookieDomain { get => Cookie.Domain; set => Cookie.Domain = value; }
68-
69-
/// <summary>
70-
/// <para>
71-
/// This property is obsolete and will be removed in a future version. The recommended alternative is <seealso cref="CookieBuilder.Path"/> on <see cref="Cookie"/>.
72-
/// </para>
73-
/// <para>
74-
/// Determines the path used to create the cookie.
75-
/// Defaults to <see cref="SessionDefaults.CookiePath"/>.
76-
/// </para>
77-
/// </summary>
78-
[Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is " + nameof(Cookie) + "." + nameof(CookieBuilder.Path) + ".")]
79-
public string CookiePath { get => Cookie.Path; set => Cookie.Path = value; }
80-
81-
/// <summary>
82-
/// <para>
83-
/// This property is obsolete and will be removed in a future version. The recommended alternative is <seealso cref="CookieBuilder.HttpOnly"/> on <see cref="Cookie"/>.
84-
/// </para>
85-
/// <para>
86-
/// Determines if the browser should allow the cookie to be accessed by client-side JavaScript. The
87-
/// default is true, which means the cookie will only be passed to HTTP requests and is not made available
88-
/// to script on the page.
89-
/// </para>
90-
/// </summary>
91-
[Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is " + nameof(Cookie) + "." + nameof(CookieBuilder.HttpOnly) + ".")]
92-
public bool CookieHttpOnly { get => Cookie.HttpOnly; set => Cookie.HttpOnly = value; }
93-
94-
/// <summary>
95-
/// <para>
96-
/// This property is obsolete and will be removed in a future version. The recommended alternative is <seealso cref="CookieBuilder.SecurePolicy"/> on <see cref="Cookie"/>.
97-
/// </para>
98-
/// <para>
99-
/// Determines if the cookie should only be transmitted on HTTPS requests.
100-
/// </para>
101-
/// </summary>
102-
[Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is " + nameof(Cookie) + "." + nameof(CookieBuilder.SecurePolicy) + ".")]
103-
public CookieSecurePolicy CookieSecure { get => Cookie.SecurePolicy; set => Cookie.SecurePolicy = value; }
104-
#endregion
105-
10646
private class SessionCookieBuilder : CookieBuilder
10747
{
10848
public SessionCookieBuilder()

src/Middleware/Session/src/baseline.netcore.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"AssemblyIdentity": "Microsoft.AspNetCore.Session, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60",
2+
"AssemblyIdentity": "Microsoft.AspNetCore.Session, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60",
33
"Types": [
44
{
55
"Name": "Microsoft.Extensions.DependencyInjection.SessionServiceCollectionExtensions",
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[
2+
{
3+
"TypeId": "public class Microsoft.AspNetCore.Builder.SessionOptions",
4+
"MemberId": "public Microsoft.AspNetCore.Http.CookieSecurePolicy get_CookieSecure()",
5+
"Kind": "Removal"
6+
},
7+
{
8+
"TypeId": "public class Microsoft.AspNetCore.Builder.SessionOptions",
9+
"MemberId": "public System.Boolean get_CookieHttpOnly()",
10+
"Kind": "Removal"
11+
},
12+
{
13+
"TypeId": "public class Microsoft.AspNetCore.Builder.SessionOptions",
14+
"MemberId": "public System.String get_CookieDomain()",
15+
"Kind": "Removal"
16+
},
17+
{
18+
"TypeId": "public class Microsoft.AspNetCore.Builder.SessionOptions",
19+
"MemberId": "public System.String get_CookieName()",
20+
"Kind": "Removal"
21+
},
22+
{
23+
"TypeId": "public class Microsoft.AspNetCore.Builder.SessionOptions",
24+
"MemberId": "public System.String get_CookiePath()",
25+
"Kind": "Removal"
26+
},
27+
{
28+
"TypeId": "public class Microsoft.AspNetCore.Builder.SessionOptions",
29+
"MemberId": "public System.Void set_CookieDomain(System.String value)",
30+
"Kind": "Removal"
31+
},
32+
{
33+
"TypeId": "public class Microsoft.AspNetCore.Builder.SessionOptions",
34+
"MemberId": "public System.Void set_CookieHttpOnly(System.Boolean value)",
35+
"Kind": "Removal"
36+
},
37+
{
38+
"TypeId": "public class Microsoft.AspNetCore.Builder.SessionOptions",
39+
"MemberId": "public System.Void set_CookieName(System.String value)",
40+
"Kind": "Removal"
41+
},
42+
{
43+
"TypeId": "public class Microsoft.AspNetCore.Builder.SessionOptions",
44+
"MemberId": "public System.Void set_CookiePath(System.String value)",
45+
"Kind": "Removal"
46+
},
47+
{
48+
"TypeId": "public class Microsoft.AspNetCore.Builder.SessionOptions",
49+
"MemberId": "public System.Void set_CookieSecure(Microsoft.AspNetCore.Http.CookieSecurePolicy value)",
50+
"Kind": "Removal"
51+
}
52+
]

0 commit comments

Comments
 (0)