Skip to content

Commit 962d65e

Browse files
committed
Remove the members obsoleted in OpenIddict 7.x
1 parent 7404f14 commit 962d65e

16 files changed

Lines changed: 5 additions & 766 deletions

src/OpenIddict.Abstractions/Primitives/OpenIddictMessage.cs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -177,37 +177,6 @@ public OpenIddictMessage(IEnumerable<KeyValuePair<string, ImmutableArray<string?
177177
}
178178
}
179179

180-
/// <summary>
181-
/// Initializes a new OpenIddict message.
182-
/// </summary>
183-
/// <param name="parameters">The message parameters.</param>
184-
/// <remarks>Parameters with a null or empty key are always ignored.</remarks>
185-
[Obsolete("This constructor is obsolete and will be removed in a future version.")]
186-
public OpenIddictMessage(IEnumerable<KeyValuePair<string, ImmutableArray<string?>?>> parameters)
187-
{
188-
ArgumentNullException.ThrowIfNull(parameters);
189-
190-
foreach (var parameter in parameters)
191-
{
192-
// Ignore parameters whose name is null or empty.
193-
if (string.IsNullOrEmpty(parameter.Key))
194-
{
195-
continue;
196-
}
197-
198-
// Note: the core OAuth 2.0 specification requires that request parameters
199-
// not be present more than once but derived specifications like the
200-
// token exchange specification deliberately allow specifying multiple
201-
// parameters with the same name to represent a multi-valued parameter.
202-
AddParameter(parameter.Key, parameter.Value switch
203-
{
204-
null or { IsDefaultOrEmpty: true } => default,
205-
[string value] => new OpenIddictParameter(value),
206-
[..] values => new OpenIddictParameter(values)
207-
});
208-
}
209-
}
210-
211180
/// <summary>
212181
/// Initializes a new OpenIddict message.
213182
/// </summary>

src/OpenIddict.Abstractions/Primitives/OpenIddictRequest.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,6 @@ public OpenIddictRequest(IEnumerable<KeyValuePair<string, ImmutableArray<string?
8585
{
8686
}
8787

88-
/// <summary>
89-
/// Initializes a new OpenIddict request.
90-
/// </summary>
91-
/// <param name="parameters">The request parameters.</param>
92-
/// <remarks>Parameters with a null or empty key are always ignored.</remarks>
93-
[Obsolete("This constructor is obsolete and will be removed in a future version.")]
94-
public OpenIddictRequest(IEnumerable<KeyValuePair<string, ImmutableArray<string?>?>> parameters)
95-
: base(parameters)
96-
{
97-
}
98-
9988
/// <summary>
10089
/// Initializes a new OpenIddict request.
10190
/// </summary>

src/OpenIddict.Abstractions/Primitives/OpenIddictResponse.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,6 @@ public OpenIddictResponse(IEnumerable<KeyValuePair<string, ImmutableArray<string
8484
{
8585
}
8686

87-
/// <summary>
88-
/// Initializes a new OpenIddict response.
89-
/// </summary>
90-
/// <param name="parameters">The response parameters.</param>
91-
/// <remarks>Parameters with a null or empty key are always ignored.</remarks>
92-
[Obsolete("This constructor is obsolete and will be removed in a future version.")]
93-
public OpenIddictResponse(IEnumerable<KeyValuePair<string, ImmutableArray<string?>?>> parameters)
94-
: base(parameters)
95-
{
96-
}
97-
9887
/// <summary>
9988
/// Initializes a new OpenIddict response.
10089
/// </summary>

src/OpenIddict.Client.SystemIntegration/OpenIddictClientSystemIntegrationHandlers.cs

Lines changed: 0 additions & 349 deletions
Large diffs are not rendered by default.

src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpBuilder.cs

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
using System.Net.Http.Headers;
1010
using System.Net.Mail;
1111
using System.Reflection;
12-
using System.Security.Cryptography.X509Certificates;
1312
using OpenIddict.Client;
1413
using OpenIddict.Client.SystemNetHttp;
1514
using Polly;
@@ -287,50 +286,6 @@ public OpenIddictClientSystemNetHttpBuilder SetProductInformation(Assembly assem
287286
productVersion: assembly.GetName().Version!.ToString()));
288287
}
289288

290-
/// <summary>
291-
/// Sets the delegate called by OpenIddict when trying to resolve the self-signed
292-
/// TLS client authentication certificate that will be used for OAuth 2.0
293-
/// mTLS-based client authentication (self_signed_tls_client_auth), if applicable.
294-
/// </summary>
295-
/// <param name="selector">The selector delegate.</param>
296-
/// <remarks>
297-
/// If no value is explicitly set, OpenIddict automatically tries to resolve the
298-
/// X.509 certificate from the signing credentials attached to the client registration
299-
/// (in this case, the X.509 certificate MUST include the digital signature and
300-
/// client authentication key usages to be automatically selected by OpenIddict).
301-
/// </remarks>
302-
/// <returns>The <see cref="OpenIddictClientSystemNetHttpBuilder"/> instance.</returns>
303-
[Obsolete("This option is no longer supported and will be removed in a future version.")]
304-
public OpenIddictClientSystemNetHttpBuilder SetSelfSignedTlsClientAuthenticationCertificateSelector(
305-
Func<OpenIddictClientRegistration, X509Certificate2?> selector)
306-
{
307-
ArgumentNullException.ThrowIfNull(selector);
308-
309-
return Configure(options => options.SelfSignedTlsClientAuthenticationCertificateSelector = selector);
310-
}
311-
312-
/// <summary>
313-
/// Sets the delegate called by OpenIddict when trying to resolve the
314-
/// TLS client authentication certificate that will be used for OAuth 2.0
315-
/// mTLS-based client authentication (tls_client_auth), if applicable.
316-
/// </summary>
317-
/// <param name="selector">The selector delegate.</param>
318-
/// <remarks>
319-
/// If no value is explicitly set, OpenIddict automatically tries to resolve the
320-
/// X.509 certificate from the signing credentials attached to the client registration
321-
/// (in this case, the X.509 certificate MUST include the digital signature and
322-
/// client authentication key usages to be automatically selected by OpenIddict).
323-
/// </remarks>
324-
/// <returns>The <see cref="OpenIddictClientSystemNetHttpBuilder"/> instance.</returns>
325-
[Obsolete("This option is no longer supported and will be removed in a future version.")]
326-
public OpenIddictClientSystemNetHttpBuilder SetTlsClientAuthenticationCertificateSelector(
327-
Func<OpenIddictClientRegistration, X509Certificate2?> selector)
328-
{
329-
ArgumentNullException.ThrowIfNull(selector);
330-
331-
return Configure(options => options.TlsClientAuthenticationCertificateSelector = selector);
332-
}
333-
334289
/// <inheritdoc/>
335290
[EditorBrowsable(EditorBrowsableState.Never)]
336291
public override bool Equals(object? obj) => base.Equals(obj);

src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpConfiguration.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ namespace OpenIddict.Client.SystemNetHttp;
2525
[EditorBrowsable(EditorBrowsableState.Advanced)]
2626
public sealed class OpenIddictClientSystemNetHttpConfiguration : IConfigureOptions<OpenIddictClientOptions>,
2727
IConfigureNamedOptions<HttpClientFactoryOptions>,
28-
IPostConfigureOptions<HttpClientFactoryOptions>,
29-
IPostConfigureOptions<OpenIddictClientSystemNetHttpOptions>
28+
IPostConfigureOptions<HttpClientFactoryOptions>
3029
{
3130
private readonly IServiceProvider _provider;
3231

@@ -217,9 +216,4 @@ public void PostConfigure(string? name, HttpClientFactoryOptions options)
217216
handler.UseCookies = false;
218217
});
219218
}
220-
221-
/// <inheritdoc/>
222-
[Obsolete("This method is no longer supported and will be removed in a future version.")]
223-
public void PostConfigure(string? name, OpenIddictClientSystemNetHttpOptions options)
224-
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
225219
}

src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlers.cs

Lines changed: 0 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -32,138 +32,6 @@ public static partial class OpenIddictClientSystemNetHttpHandlers
3232
.. UserInfo.DefaultHandlers
3333
];
3434

35-
/// <summary>
36-
/// Contains the logic responsible for negotiating the best token endpoint client
37-
/// authentication method supported by both the client and the authorization server.
38-
/// </summary>
39-
[Obsolete("This class is obsolete and will be removed in a future version.")]
40-
public sealed class AttachNonDefaultTokenEndpointClientAuthenticationMethod : IOpenIddictClientHandler<ProcessAuthenticationContext>
41-
{
42-
/// <summary>
43-
/// Gets the default descriptor definition assigned to this handler.
44-
/// </summary>
45-
public static OpenIddictClientHandlerDescriptor Descriptor { get; }
46-
= OpenIddictClientHandlerDescriptor.CreateBuilder<ProcessAuthenticationContext>()
47-
.AddFilter<RequireTokenRequest>()
48-
.UseSingletonHandler<AttachNonDefaultTokenEndpointClientAuthenticationMethod>()
49-
.SetOrder(AttachTokenEndpointClientAuthenticationMethod.Descriptor.Order - 500)
50-
.SetType(OpenIddictClientHandlerType.BuiltIn)
51-
.Build();
52-
53-
/// <inheritdoc/>
54-
public ValueTask HandleAsync(ProcessAuthenticationContext context) => ValueTask.CompletedTask;
55-
}
56-
57-
/// <summary>
58-
/// Contains the logic responsible for negotiating the best token binding
59-
/// methods supported by both the client and the authorization server.
60-
/// </summary>
61-
[Obsolete("This class is obsolete and will be removed in a future version.")]
62-
public sealed class AttachNonDefaultUserInfoEndpointTokenBindingMethods : IOpenIddictClientHandler<ProcessAuthenticationContext>
63-
{
64-
/// <summary>
65-
/// Gets the default descriptor definition assigned to this handler.
66-
/// </summary>
67-
public static OpenIddictClientHandlerDescriptor Descriptor { get; }
68-
= OpenIddictClientHandlerDescriptor.CreateBuilder<ProcessAuthenticationContext>()
69-
.AddFilter<RequireUserInfoRequest>()
70-
.UseSingletonHandler<AttachNonDefaultUserInfoEndpointTokenBindingMethods>()
71-
.SetOrder(AttachUserInfoEndpointTokenBindingMethods.Descriptor.Order - 500)
72-
.SetType(OpenIddictClientHandlerType.BuiltIn)
73-
.Build();
74-
75-
/// <inheritdoc/>
76-
public ValueTask HandleAsync(ProcessAuthenticationContext context) => ValueTask.CompletedTask;
77-
}
78-
79-
/// <summary>
80-
/// Contains the logic responsible for negotiating the best device authorization endpoint
81-
/// client authentication method supported by both the client and the authorization server.
82-
/// </summary>
83-
[Obsolete("This class is obsolete and will be removed in a future version.")]
84-
public sealed class AttachNonDefaultDeviceAuthorizationEndpointClientAuthenticationMethod : IOpenIddictClientHandler<ProcessChallengeContext>
85-
{
86-
/// <summary>
87-
/// Gets the default descriptor definition assigned to this handler.
88-
/// </summary>
89-
public static OpenIddictClientHandlerDescriptor Descriptor { get; }
90-
= OpenIddictClientHandlerDescriptor.CreateBuilder<ProcessChallengeContext>()
91-
.AddFilter<RequireDeviceAuthorizationRequest>()
92-
.UseSingletonHandler<AttachNonDefaultDeviceAuthorizationEndpointClientAuthenticationMethod>()
93-
.SetOrder(AttachDeviceAuthorizationEndpointClientAuthenticationMethod.Descriptor.Order - 500)
94-
.SetType(OpenIddictClientHandlerType.BuiltIn)
95-
.Build();
96-
97-
/// <inheritdoc/>
98-
public ValueTask HandleAsync(ProcessChallengeContext context) => ValueTask.CompletedTask;
99-
}
100-
101-
/// <summary>
102-
/// Contains the logic responsible for negotiating the best pushed authorization endpoint
103-
/// client authentication method supported by both the client and the authorization server.
104-
/// </summary>
105-
[Obsolete("This class is obsolete and will be removed in a future version.")]
106-
public sealed class AttachNonDefaultPushedAuthorizationEndpointClientAuthenticationMethod : IOpenIddictClientHandler<ProcessChallengeContext>
107-
{
108-
/// <summary>
109-
/// Gets the default descriptor definition assigned to this handler.
110-
/// </summary>
111-
public static OpenIddictClientHandlerDescriptor Descriptor { get; }
112-
= OpenIddictClientHandlerDescriptor.CreateBuilder<ProcessChallengeContext>()
113-
.AddFilter<RequirePushedAuthorizationRequest>()
114-
.UseSingletonHandler<AttachNonDefaultPushedAuthorizationEndpointClientAuthenticationMethod>()
115-
.SetOrder(AttachPushedAuthorizationEndpointClientAuthenticationMethod.Descriptor.Order - 500)
116-
.SetType(OpenIddictClientHandlerType.BuiltIn)
117-
.Build();
118-
119-
/// <inheritdoc/>
120-
public ValueTask HandleAsync(ProcessChallengeContext context) => ValueTask.CompletedTask;
121-
}
122-
123-
/// <summary>
124-
/// Contains the logic responsible for negotiating the best introspection endpoint client
125-
/// authentication method supported by both the client and the authorization server.
126-
/// </summary>
127-
[Obsolete("This class is obsolete and will be removed in a future version.")]
128-
public sealed class AttachNonDefaultIntrospectionEndpointClientAuthenticationMethod : IOpenIddictClientHandler<ProcessIntrospectionContext>
129-
{
130-
/// <summary>
131-
/// Gets the default descriptor definition assigned to this handler.
132-
/// </summary>
133-
public static OpenIddictClientHandlerDescriptor Descriptor { get; }
134-
= OpenIddictClientHandlerDescriptor.CreateBuilder<ProcessIntrospectionContext>()
135-
.AddFilter<RequireIntrospectionRequest>()
136-
.UseSingletonHandler<AttachNonDefaultIntrospectionEndpointClientAuthenticationMethod>()
137-
.SetOrder(AttachIntrospectionEndpointClientAuthenticationMethod.Descriptor.Order - 500)
138-
.SetType(OpenIddictClientHandlerType.BuiltIn)
139-
.Build();
140-
141-
/// <inheritdoc/>
142-
public ValueTask HandleAsync(ProcessIntrospectionContext context) => ValueTask.CompletedTask;
143-
}
144-
145-
/// <summary>
146-
/// Contains the logic responsible for negotiating the best revocation endpoint client
147-
/// authentication method supported by both the client and the authorization server.
148-
/// </summary>
149-
[Obsolete("This class is obsolete and will be removed in a future version.")]
150-
public sealed class AttachNonDefaultRevocationEndpointClientAuthenticationMethod : IOpenIddictClientHandler<ProcessRevocationContext>
151-
{
152-
/// <summary>
153-
/// Gets the default descriptor definition assigned to this handler.
154-
/// </summary>
155-
public static OpenIddictClientHandlerDescriptor Descriptor { get; }
156-
= OpenIddictClientHandlerDescriptor.CreateBuilder<ProcessRevocationContext>()
157-
.AddFilter<RequireRevocationRequest>()
158-
.UseSingletonHandler<AttachNonDefaultRevocationEndpointClientAuthenticationMethod>()
159-
.SetOrder(AttachRevocationEndpointClientAuthenticationMethod.Descriptor.Order - 500)
160-
.SetType(OpenIddictClientHandlerType.BuiltIn)
161-
.Build();
162-
163-
/// <inheritdoc/>
164-
public ValueTask HandleAsync(ProcessRevocationContext context) => ValueTask.CompletedTask;
165-
}
166-
16735
/// <summary>
16836
/// Contains the logic responsible for creating and attaching a <see cref="HttpClient"/>.
16937
/// </summary>

src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpOptions.cs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44
* the license and the contributors participating to this project.
55
*/
66

7-
using System.ComponentModel;
87
using System.Net;
98
using System.Net.Http;
109
using System.Net.Http.Headers;
1110
using System.Net.Mail;
12-
using System.Security.Cryptography.X509Certificates;
1311
using Polly;
1412
using Polly.Extensions.Http;
1513

@@ -82,34 +80,4 @@ public sealed class OpenIddictClientSystemNetHttpOptions
8280
/// instances created by the OpenIddict client/System.Net.Http integration.
8381
/// </summary>
8482
public List<Action<OpenIddictClientRegistration, HttpClientHandler>> HttpClientHandlerActions { get; } = [];
85-
86-
/// <summary>
87-
/// Gets or sets the delegate called by OpenIddict when trying to resolve the
88-
/// self-signed TLS client authentication certificate that will be used for OAuth 2.0
89-
/// mTLS-based client authentication (self_signed_tls_client_auth), if applicable.
90-
/// </summary>
91-
/// <remarks>
92-
/// If no value is explicitly set, OpenIddict automatically tries to resolve the
93-
/// X.509 certificate from the signing credentials attached to the client registration
94-
/// (in this case, the X.509 certificate MUST include the digital signature and
95-
/// client authentication key usages to be automatically selected by OpenIddict).
96-
/// </remarks>
97-
[EditorBrowsable(EditorBrowsableState.Advanced)]
98-
[Obsolete("This option is no longer supported and will be removed in a future version.")]
99-
public Func<OpenIddictClientRegistration, X509Certificate2?> SelfSignedTlsClientAuthenticationCertificateSelector { get; set; } = default!;
100-
101-
/// <summary>
102-
/// Gets or sets the delegate called by OpenIddict when trying to resolve the TLS
103-
/// client authentication certificate that will be used for OAuth 2.0 mTLS-based
104-
/// client authentication (tls_client_auth), if applicable.
105-
/// </summary>
106-
/// <remarks>
107-
/// If no value is explicitly set, OpenIddict automatically tries to resolve the
108-
/// X.509 certificate from the signing credentials attached to the client registration
109-
/// (in this case, the X.509 certificate MUST include the digital signature and
110-
/// client authentication key usages to be automatically selected by OpenIddict).
111-
/// </remarks>
112-
[EditorBrowsable(EditorBrowsableState.Advanced)]
113-
[Obsolete("This option is no longer supported and will be removed in a future version.")]
114-
public Func<OpenIddictClientRegistration, X509Certificate2?> TlsClientAuthenticationCertificateSelector { get; set; } = default!;
11583
}

src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationConfiguration.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
using System.ComponentModel;
88
using Microsoft.Extensions.Options;
9-
using OpenIddict.Client.SystemNetHttp;
109

1110
namespace OpenIddict.Client.WebIntegration;
1211

@@ -15,8 +14,7 @@ namespace OpenIddict.Client.WebIntegration;
1514
/// </summary>
1615
[EditorBrowsable(EditorBrowsableState.Advanced)]
1716
public sealed partial class OpenIddictClientWebIntegrationConfiguration : IConfigureOptions<OpenIddictClientOptions>,
18-
IPostConfigureOptions<OpenIddictClientOptions>,
19-
IPostConfigureOptions<OpenIddictClientSystemNetHttpOptions>
17+
IPostConfigureOptions<OpenIddictClientOptions>
2018
{
2119
/// <inheritdoc/>
2220
public void Configure(OpenIddictClientOptions options)
@@ -43,11 +41,6 @@ public void PostConfigure(string? name, OpenIddictClientOptions options)
4341
}
4442
}
4543

46-
/// <inheritdoc/>
47-
[Obsolete("This method is no longer supported and will be removed in a future version.")]
48-
public void PostConfigure(string? name, OpenIddictClientSystemNetHttpOptions options)
49-
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
50-
5144
/// <summary>
5245
/// Amends the registration with the provider-specific configuration logic.
5346
/// </summary>

src/OpenIddict.Client/OpenIddictClientEvents.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,6 @@ protected BaseExternalContext(OpenIddictClientTransaction transaction)
171171
/// this peer when communicating with the external endpoint, if applicable.
172172
/// </summary>
173173
public X509Certificate2? LocalCertificate { get; set; }
174-
175-
/// <summary>
176-
/// Gets or sets the token binding method used when communicating with the external endpoint, if applicable.
177-
/// </summary>
178-
[Obsolete("This property is no longer used and will be removed in a future version.")]
179-
public HashSet<string> TokenBindingMethods { get; } = new(StringComparer.Ordinal);
180174
}
181175

182176
/// <summary>
@@ -434,13 +428,6 @@ public OpenIddictRequest Request
434428
/// </summary>
435429
public X509Certificate2? UserInfoEndpointClientCertificate { get; set; }
436430

437-
/// <summary>
438-
/// Gets or sets the token binding methods used when
439-
/// communicating with the userinfo endpoint, if applicable.
440-
/// </summary>
441-
[Obsolete("This property is no longer used and will be removed in a future version.")]
442-
public HashSet<string> UserInfoEndpointTokenBindingMethods { get; } = new(StringComparer.Ordinal);
443-
444431
/// <summary>
445432
/// Gets or sets a boolean indicating whether the token entry associated
446433
/// with the state token should be marked as redeemed in the database.

0 commit comments

Comments
 (0)