Skip to content

Commit dd3937c

Browse files
committed
Remove the members obsoleted in OpenIddict 6.1
1 parent 007266e commit dd3937c

20 files changed

+1
-749
lines changed

Directory.Packages.props

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.Abstractions" Version="2.3.0" />
2828
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="6.0.0" />
2929
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="2.3.0" />
30-
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
3130
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
3231
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
3332
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
@@ -112,7 +111,6 @@
112111
Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' And $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) ">
113112
<PackageVersion Include="EntityFramework" Version="6.5.1" />
114113
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.14" />
115-
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
116114
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
117115
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
118116
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
@@ -160,7 +158,6 @@
160158
Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' And $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '9.0')) ">
161159
<PackageVersion Include="EntityFramework" Version="6.5.1" />
162160
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.3" />
163-
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.3" />
164161
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.3" />
165162
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.3" />
166163
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.3" />
@@ -224,7 +221,6 @@
224221
<PackageVersion Include="Microsoft.AspNetCore.DataProtection" Version="2.3.0" />
225222
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="6.0.0" />
226223
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="2.3.0" />
227-
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
228224
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
229225
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
230226
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
@@ -273,7 +269,6 @@
273269
<PackageVersion Include="EntityFramework" Version="6.5.1" />
274270
<PackageVersion Include="Microsoft.AspNetCore.DataProtection" Version="2.3.0" />
275271
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="2.3.0" />
276-
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
277272
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
278273
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
279274
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
@@ -317,7 +312,7 @@
317312
<PackageVersion Include="NamedPipeServerStream.NetFrameworkVersion" Version="1.1.7" />
318313

319314
<!--
320-
Note: OpenIddict uses PolySharp to dynamically generate polyfills for types that are not available on
315+
Note: OpenIddict uses PolySharp to dynamically generate pstring?[]olyfills for types that are not available on
321316
some of the targeted TFMs (e.g Index, Range or nullable attributes on .NET Framework/.NET Standard).
322317
-->
323318
<GlobalPackageReference Include="PolySharp" Condition=" '$(DisablePolySharp)' != 'true' " Version="1.15.0" />

src/OpenIddict.Abstractions/OpenIddictConstants.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,6 @@ public static class Parameters
369369
public const string RefreshToken = "refresh_token";
370370
public const string Registration = "registration";
371371
public const string Request = "request";
372-
[Obsolete("This property is obsolete and will be removed in a future version.")]
373-
public const string RequestId = "request_id";
374372
public const string RequestUri = "request_uri";
375373
public const string Resource = "resource";
376374
public const string ResponseMode = "response_mode";

src/OpenIddict.Abstractions/OpenIddictResources.resx

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -498,19 +498,6 @@ This may indicate that the event handler responsible for processing OpenID Conne
498498
<data name="ID0115" xml:space="preserve">
499499
<value>Only strings, booleans, integers, arrays of strings and instances of type 'OpenIddictParameter', 'JsonElement' or derived from 'JsonNode' can be returned as custom parameters.</value>
500500
</data>
501-
<data name="ID0116" xml:space="preserve">
502-
<value>A distributed cache instance must be registered when enabling request caching.
503-
To register the default in-memory distributed cache implementation, reference the 'Microsoft.Extensions.Caching.Memory' package and call 'services.AddDistributedMemoryCache()' from 'ConfigureServices'.</value>
504-
<comment>This resource is no longer used and will be removed in a future version.</comment>
505-
</data>
506-
<data name="ID0117" xml:space="preserve">
507-
<value>The authorization request payload is malformed.</value>
508-
<comment>This resource is no longer used and will be removed in a future version.</comment>
509-
</data>
510-
<data name="ID0118" xml:space="preserve">
511-
<value>The end session request payload is malformed.</value>
512-
<comment>This resource is no longer used and will be removed in a future version.</comment>
513-
</data>
514501
<data name="ID0119" xml:space="preserve">
515502
<value>The OpenIddict OWIN server handler cannot be used as an active authentication handler.
516503
Make sure that 'OpenIddictServerOwinOptions.AuthenticationMode' is not set to 'Active'.</value>
@@ -1306,20 +1293,12 @@ Alternatively, you can disable the token storage feature by calling 'services.Ad
13061293
<data name="ID0340" xml:space="preserve">
13071294
<value>The endpoint type associated with the state token cannot be resolved.</value>
13081295
</data>
1309-
<data name="ID0341" xml:space="preserve">
1310-
<value>No client registration information was specified in the sign-out properties. When multiple clients are registered, an issuer, a provider name or a client registration identifier must be specified in the sign-out properties.</value>
1311-
<comment>This resource is no longer used and will be removed in a future version.</comment>
1312-
</data>
13131296
<data name="ID0342" xml:space="preserve">
13141297
<value>The same issuer cannot be used in multiple client registrations.</value>
13151298
</data>
13161299
<data name="ID0343" xml:space="preserve">
13171300
<value>The request forgery protection claim cannot be resolved from the context.</value>
13181301
</data>
1319-
<data name="ID0344" xml:space="preserve">
1320-
<value>The request forgery protection claim cannot be resolved from the sign-out context.</value>
1321-
<comment>This resource is no longer used and will be removed in a future version.</comment>
1322-
</data>
13231302
<data name="ID0345" xml:space="preserve">
13241303
<value>The product name cannot be null or empty.</value>
13251304
</data>
@@ -1344,10 +1323,6 @@ Alternatively, you can disable the token storage feature by calling 'services.Ad
13441323
<data name="ID0352" xml:space="preserve">
13451324
<value>The nonce cannot be resolved from the context.</value>
13461325
</data>
1347-
<data name="ID0353" xml:space="preserve">
1348-
<value>The nonce cannot be resolved from the sign-out context.</value>
1349-
<comment>This resource is no longer used and will be removed in a future version.</comment>
1350-
</data>
13511326
<data name="ID0354" xml:space="preserve">
13521327
<value>The nonce cannot be resolved from the state token.</value>
13531328
</data>

src/OpenIddict.Abstractions/Primitives/OpenIddictRequest.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -367,16 +367,6 @@ public string? Request
367367
set => SetParameter(OpenIddictConstants.Parameters.Request, value);
368368
}
369369

370-
/// <summary>
371-
/// Gets or sets the "request_id" parameter.
372-
/// </summary>
373-
[Obsolete("This property is obsolete and will be removed in a future version.")]
374-
public string? RequestId
375-
{
376-
get => (string?) GetParameter(OpenIddictConstants.Parameters.RequestId);
377-
set => SetParameter(OpenIddictConstants.Parameters.RequestId, value);
378-
}
379-
380370
/// <summary>
381371
/// Gets or sets the "request_uri" parameter.
382372
/// </summary>

src/OpenIddict.Server.AspNetCore/OpenIddict.Server.AspNetCore.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' Or '$(TargetFrameworkIdentifier)' == '.NETStandard' ">
2222
<PackageReference Include="Microsoft.AspNetCore.Authentication" />
2323
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.Abstractions" />
24-
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" />
2524
</ItemGroup>
2625

2726
<ItemGroup>

src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreBuilder.cs

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
using System.ComponentModel;
88
using Microsoft.AspNetCore;
9-
using Microsoft.Extensions.Caching.Distributed;
10-
using OpenIddict.Server;
119
using OpenIddict.Server.AspNetCore;
1210

1311
namespace Microsoft.Extensions.DependencyInjection;
@@ -120,35 +118,6 @@ public OpenIddictServerAspNetCoreBuilder EnableTokenEndpointPassthrough()
120118
public OpenIddictServerAspNetCoreBuilder EnableUserInfoEndpointPassthrough()
121119
=> Configure(options => options.EnableUserInfoEndpointPassthrough = true);
122120

123-
/// <summary>
124-
/// Enables authorization request caching, so that authorization requests
125-
/// are automatically stored in the distributed cache, which allows flowing
126-
/// large payloads across requests. Enabling this option is recommended
127-
/// when using external authentication providers or when large GET or POST
128-
/// OpenID Connect authorization requests support is required.
129-
/// </summary>
130-
/// <returns>The <see cref="OpenIddictServerAspNetCoreBuilder"/> instance.</returns>
131-
[Obsolete("This method is obsolete and will be removed in a future version.")]
132-
public OpenIddictServerAspNetCoreBuilder EnableAuthorizationRequestCaching()
133-
{
134-
Services.Configure<OpenIddictServerOptions>(options => options.EnableAuthorizationRequestCaching = true);
135-
136-
return this;
137-
}
138-
139-
/// <summary>
140-
/// Enables end session request caching, so that end session requests
141-
/// are automatically stored in the distributed cache.
142-
/// </summary>
143-
/// <returns>The <see cref="OpenIddictServerAspNetCoreBuilder"/> instance.</returns>
144-
[Obsolete("This method is obsolete and will be removed in a future version.")]
145-
public OpenIddictServerAspNetCoreBuilder EnableEndSessionRequestCaching()
146-
{
147-
Services.Configure<OpenIddictServerOptions>(options => options.EnableEndSessionRequestCaching = true);
148-
149-
return this;
150-
}
151-
152121
/// <summary>
153122
/// Enables status code pages integration support. Once enabled, errors
154123
/// generated by the interactive endpoints can be handled by ASP.NET Core.
@@ -179,40 +148,6 @@ public OpenIddictServerAspNetCoreBuilder SetRealm(string realm)
179148
return Configure(options => options.Realm = realm);
180149
}
181150

182-
/// <summary>
183-
/// Sets the caching policy used by the authorization endpoint.
184-
/// Note: the specified policy is only used when caching is explicitly enabled.
185-
/// </summary>
186-
/// <param name="policy">The caching policy.</param>
187-
/// <returns>The <see cref="OpenIddictServerAspNetCoreBuilder"/> instance.</returns>
188-
[Obsolete("This method is obsolete and will be removed in a future version.")]
189-
public OpenIddictServerAspNetCoreBuilder SetAuthorizationRequestCachingPolicy(DistributedCacheEntryOptions policy)
190-
{
191-
if (policy is null)
192-
{
193-
throw new ArgumentNullException(nameof(policy));
194-
}
195-
196-
return Configure(options => options.AuthorizationRequestCachingPolicy = policy);
197-
}
198-
199-
/// <summary>
200-
/// Sets the caching policy used by the end session endpoint.
201-
/// Note: the specified policy is only used when caching is explicitly enabled.
202-
/// </summary>
203-
/// <param name="policy">The caching policy.</param>
204-
/// <returns>The <see cref="OpenIddictServerAspNetCoreBuilder"/> instance.</returns>
205-
[Obsolete("This method is obsolete and will be removed in a future version.")]
206-
public OpenIddictServerAspNetCoreBuilder SetEndSessionRequestCachingPolicy(DistributedCacheEntryOptions policy)
207-
{
208-
if (policy is null)
209-
{
210-
throw new ArgumentNullException(nameof(policy));
211-
}
212-
213-
return Configure(options => options.EndSessionRequestCachingPolicy = policy);
214-
}
215-
216151
/// <inheritdoc/>
217152
[EditorBrowsable(EditorBrowsableState.Never)]
218153
public override bool Equals(object? obj) => base.Equals(obj);

src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreConstants.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,6 @@ namespace OpenIddict.Server.AspNetCore;
1111
/// </summary>
1212
public static class OpenIddictServerAspNetCoreConstants
1313
{
14-
[Obsolete("This class is obsolete and will be removed in a future version.")]
15-
public static class Cache
16-
{
17-
public const string AuthorizationRequest = "openiddict-authorization-request:";
18-
public const string EndSessionRequest = "openiddict-end_session-request:";
19-
}
20-
21-
[Obsolete("This class is obsolete and will be removed in a future version.")]
22-
public static class JsonWebTokenTypes
23-
{
24-
public static class Private
25-
{
26-
public const string AuthorizationRequest = "oi_authrq+jwt";
27-
public const string EndSessionRequest = "oi_endsessrq+jwt";
28-
}
29-
}
30-
3114
public static class Properties
3215
{
3316
public const string AccessTokenPrincipal = ".access_token_principal";

src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreExtensions.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ public static OpenIddictServerAspNetCoreBuilder UseAspNetCore(this OpenIddictSer
3838
builder.Services.TryAdd(OpenIddictServerAspNetCoreHandlers.DefaultHandlers.Select(descriptor => descriptor.ServiceDescriptor));
3939

4040
// Register the built-in filters used by the default OpenIddict ASP.NET Core server event handlers.
41-
#pragma warning disable CS0618
42-
builder.Services.TryAddSingleton<RequireAuthorizationRequestCachingEnabled>();
43-
builder.Services.TryAddSingleton<RequireEndSessionRequestCachingEnabled>();
44-
#pragma warning restore CS0618
4541
builder.Services.TryAddSingleton<RequireAuthorizationEndpointPassthroughEnabled>();
4642
builder.Services.TryAddSingleton<RequireEndSessionEndpointPassthroughEnabled>();
4743
builder.Services.TryAddSingleton<RequireErrorPassthroughEnabled>();

src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlerFilters.cs

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,6 @@ namespace OpenIddict.Server.AspNetCore;
1616
[EditorBrowsable(EditorBrowsableState.Advanced)]
1717
public static class OpenIddictServerAspNetCoreHandlerFilters
1818
{
19-
/// <summary>
20-
/// Represents a filter that excludes the associated handlers if authorization request caching was not enabled.
21-
/// </summary>
22-
[Obsolete("This filter is obsolete and will be removed in a future version.")]
23-
public sealed class RequireAuthorizationRequestCachingEnabled : IOpenIddictServerHandlerFilter<BaseContext>
24-
{
25-
private readonly IOptionsMonitor<OpenIddictServerAspNetCoreOptions> _options;
26-
27-
public RequireAuthorizationRequestCachingEnabled(IOptionsMonitor<OpenIddictServerAspNetCoreOptions> options)
28-
=> _options = options ?? throw new ArgumentNullException(nameof(options));
29-
30-
/// <inheritdoc/>
31-
public ValueTask<bool> IsActiveAsync(BaseContext context)
32-
{
33-
if (context is null)
34-
{
35-
throw new ArgumentNullException(nameof(context));
36-
}
37-
38-
return new(_options.CurrentValue.EnableAuthorizationRequestCaching);
39-
}
40-
}
41-
4219
/// <summary>
4320
/// Represents a filter that excludes the associated handlers if the
4421
/// pass-through mode was not enabled for the authorization endpoint.
@@ -62,29 +39,6 @@ public ValueTask<bool> IsActiveAsync(BaseContext context)
6239
}
6340
}
6441

65-
/// <summary>
66-
/// Represents a filter that excludes the associated handlers if end session request caching was not enabled.
67-
/// </summary>
68-
[Obsolete("This filter is obsolete and will be removed in a future version.")]
69-
public sealed class RequireEndSessionRequestCachingEnabled : IOpenIddictServerHandlerFilter<BaseContext>
70-
{
71-
private readonly IOptionsMonitor<OpenIddictServerAspNetCoreOptions> _options;
72-
73-
public RequireEndSessionRequestCachingEnabled(IOptionsMonitor<OpenIddictServerAspNetCoreOptions> options)
74-
=> _options = options ?? throw new ArgumentNullException(nameof(options));
75-
76-
/// <inheritdoc/>
77-
public ValueTask<bool> IsActiveAsync(BaseContext context)
78-
{
79-
if (context is null)
80-
{
81-
throw new ArgumentNullException(nameof(context));
82-
}
83-
84-
return new(_options.CurrentValue.EnableEndSessionRequestCaching);
85-
}
86-
}
87-
8842
/// <summary>
8943
/// Represents a filter that excludes the associated handlers if the
9044
/// pass-through mode was not enabled for the end session endpoint.

0 commit comments

Comments
 (0)