Browse Source

Remove the members obsoleted in OpenIddict 6.1

pull/2274/head
Kévin Chalet 1 year ago
parent
commit
dd3937c4a5
  1. 7
      Directory.Packages.props
  2. 2
      src/OpenIddict.Abstractions/OpenIddictConstants.cs
  3. 25
      src/OpenIddict.Abstractions/OpenIddictResources.resx
  4. 10
      src/OpenIddict.Abstractions/Primitives/OpenIddictRequest.cs
  5. 1
      src/OpenIddict.Server.AspNetCore/OpenIddict.Server.AspNetCore.csproj
  6. 65
      src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreBuilder.cs
  7. 17
      src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreConstants.cs
  8. 4
      src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreExtensions.cs
  9. 46
      src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlerFilters.cs
  10. 91
      src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Authentication.cs
  11. 91
      src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Session.cs
  12. 38
      src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs
  13. 1
      src/OpenIddict.Server.Owin/OpenIddict.Server.Owin.csproj
  14. 65
      src/OpenIddict.Server.Owin/OpenIddictServerOwinBuilder.cs
  15. 17
      src/OpenIddict.Server.Owin/OpenIddictServerOwinConstants.cs
  16. 4
      src/OpenIddict.Server.Owin/OpenIddictServerOwinExtensions.cs
  17. 46
      src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlerFilters.cs
  18. 91
      src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Authentication.cs
  19. 91
      src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Session.cs
  20. 38
      src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs

7
Directory.Packages.props

@ -27,7 +27,6 @@
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.Abstractions" Version="2.3.0" />
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="6.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="2.3.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
@ -112,7 +111,6 @@
Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' And $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) ">
<PackageVersion Include="EntityFramework" Version="6.5.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.14" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
@ -160,7 +158,6 @@
Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' And $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '9.0')) ">
<PackageVersion Include="EntityFramework" Version="6.5.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.3" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.3" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.3" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.3" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.3" />
@ -224,7 +221,6 @@
<PackageVersion Include="Microsoft.AspNetCore.DataProtection" Version="2.3.0" />
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="6.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="2.3.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
@ -273,7 +269,6 @@
<PackageVersion Include="EntityFramework" Version="6.5.1" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection" Version="2.3.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="2.3.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
@ -317,7 +312,7 @@
<PackageVersion Include="NamedPipeServerStream.NetFrameworkVersion" Version="1.1.7" />
<!--
Note: OpenIddict uses PolySharp to dynamically generate polyfills for types that are not available on
Note: OpenIddict uses PolySharp to dynamically generate pstring?[]olyfills for types that are not available on
some of the targeted TFMs (e.g Index, Range or nullable attributes on .NET Framework/.NET Standard).
-->
<GlobalPackageReference Include="PolySharp" Condition=" '$(DisablePolySharp)' != 'true' " Version="1.15.0" />

2
src/OpenIddict.Abstractions/OpenIddictConstants.cs

@ -369,8 +369,6 @@ public static class OpenIddictConstants
public const string RefreshToken = "refresh_token";
public const string Registration = "registration";
public const string Request = "request";
[Obsolete("This property is obsolete and will be removed in a future version.")]
public const string RequestId = "request_id";
public const string RequestUri = "request_uri";
public const string Resource = "resource";
public const string ResponseMode = "response_mode";

25
src/OpenIddict.Abstractions/OpenIddictResources.resx

@ -498,19 +498,6 @@ This may indicate that the event handler responsible for processing OpenID Conne
<data name="ID0115" xml:space="preserve">
<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>
</data>
<data name="ID0116" xml:space="preserve">
<value>A distributed cache instance must be registered when enabling request caching.
To register the default in-memory distributed cache implementation, reference the 'Microsoft.Extensions.Caching.Memory' package and call 'services.AddDistributedMemoryCache()' from 'ConfigureServices'.</value>
<comment>This resource is no longer used and will be removed in a future version.</comment>
</data>
<data name="ID0117" xml:space="preserve">
<value>The authorization request payload is malformed.</value>
<comment>This resource is no longer used and will be removed in a future version.</comment>
</data>
<data name="ID0118" xml:space="preserve">
<value>The end session request payload is malformed.</value>
<comment>This resource is no longer used and will be removed in a future version.</comment>
</data>
<data name="ID0119" xml:space="preserve">
<value>The OpenIddict OWIN server handler cannot be used as an active authentication handler.
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
<data name="ID0340" xml:space="preserve">
<value>The endpoint type associated with the state token cannot be resolved.</value>
</data>
<data name="ID0341" xml:space="preserve">
<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>
<comment>This resource is no longer used and will be removed in a future version.</comment>
</data>
<data name="ID0342" xml:space="preserve">
<value>The same issuer cannot be used in multiple client registrations.</value>
</data>
<data name="ID0343" xml:space="preserve">
<value>The request forgery protection claim cannot be resolved from the context.</value>
</data>
<data name="ID0344" xml:space="preserve">
<value>The request forgery protection claim cannot be resolved from the sign-out context.</value>
<comment>This resource is no longer used and will be removed in a future version.</comment>
</data>
<data name="ID0345" xml:space="preserve">
<value>The product name cannot be null or empty.</value>
</data>
@ -1344,10 +1323,6 @@ Alternatively, you can disable the token storage feature by calling 'services.Ad
<data name="ID0352" xml:space="preserve">
<value>The nonce cannot be resolved from the context.</value>
</data>
<data name="ID0353" xml:space="preserve">
<value>The nonce cannot be resolved from the sign-out context.</value>
<comment>This resource is no longer used and will be removed in a future version.</comment>
</data>
<data name="ID0354" xml:space="preserve">
<value>The nonce cannot be resolved from the state token.</value>
</data>

10
src/OpenIddict.Abstractions/Primitives/OpenIddictRequest.cs

@ -367,16 +367,6 @@ public class OpenIddictRequest : OpenIddictMessage
set => SetParameter(OpenIddictConstants.Parameters.Request, value);
}
/// <summary>
/// Gets or sets the "request_id" parameter.
/// </summary>
[Obsolete("This property is obsolete and will be removed in a future version.")]
public string? RequestId
{
get => (string?) GetParameter(OpenIddictConstants.Parameters.RequestId);
set => SetParameter(OpenIddictConstants.Parameters.RequestId, value);
}
/// <summary>
/// Gets or sets the "request_uri" parameter.
/// </summary>

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

@ -21,7 +21,6 @@
Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' Or '$(TargetFrameworkIdentifier)' == '.NETStandard' ">
<PackageReference Include="Microsoft.AspNetCore.Authentication" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" />
</ItemGroup>
<ItemGroup>

65
src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreBuilder.cs

@ -6,8 +6,6 @@
using System.ComponentModel;
using Microsoft.AspNetCore;
using Microsoft.Extensions.Caching.Distributed;
using OpenIddict.Server;
using OpenIddict.Server.AspNetCore;
namespace Microsoft.Extensions.DependencyInjection;
@ -120,35 +118,6 @@ public sealed class OpenIddictServerAspNetCoreBuilder
public OpenIddictServerAspNetCoreBuilder EnableUserInfoEndpointPassthrough()
=> Configure(options => options.EnableUserInfoEndpointPassthrough = true);
/// <summary>
/// Enables authorization request caching, so that authorization requests
/// are automatically stored in the distributed cache, which allows flowing
/// large payloads across requests. Enabling this option is recommended
/// when using external authentication providers or when large GET or POST
/// OpenID Connect authorization requests support is required.
/// </summary>
/// <returns>The <see cref="OpenIddictServerAspNetCoreBuilder"/> instance.</returns>
[Obsolete("This method is obsolete and will be removed in a future version.")]
public OpenIddictServerAspNetCoreBuilder EnableAuthorizationRequestCaching()
{
Services.Configure<OpenIddictServerOptions>(options => options.EnableAuthorizationRequestCaching = true);
return this;
}
/// <summary>
/// Enables end session request caching, so that end session requests
/// are automatically stored in the distributed cache.
/// </summary>
/// <returns>The <see cref="OpenIddictServerAspNetCoreBuilder"/> instance.</returns>
[Obsolete("This method is obsolete and will be removed in a future version.")]
public OpenIddictServerAspNetCoreBuilder EnableEndSessionRequestCaching()
{
Services.Configure<OpenIddictServerOptions>(options => options.EnableEndSessionRequestCaching = true);
return this;
}
/// <summary>
/// Enables status code pages integration support. Once enabled, errors
/// generated by the interactive endpoints can be handled by ASP.NET Core.
@ -179,40 +148,6 @@ public sealed class OpenIddictServerAspNetCoreBuilder
return Configure(options => options.Realm = realm);
}
/// <summary>
/// Sets the caching policy used by the authorization endpoint.
/// Note: the specified policy is only used when caching is explicitly enabled.
/// </summary>
/// <param name="policy">The caching policy.</param>
/// <returns>The <see cref="OpenIddictServerAspNetCoreBuilder"/> instance.</returns>
[Obsolete("This method is obsolete and will be removed in a future version.")]
public OpenIddictServerAspNetCoreBuilder SetAuthorizationRequestCachingPolicy(DistributedCacheEntryOptions policy)
{
if (policy is null)
{
throw new ArgumentNullException(nameof(policy));
}
return Configure(options => options.AuthorizationRequestCachingPolicy = policy);
}
/// <summary>
/// Sets the caching policy used by the end session endpoint.
/// Note: the specified policy is only used when caching is explicitly enabled.
/// </summary>
/// <param name="policy">The caching policy.</param>
/// <returns>The <see cref="OpenIddictServerAspNetCoreBuilder"/> instance.</returns>
[Obsolete("This method is obsolete and will be removed in a future version.")]
public OpenIddictServerAspNetCoreBuilder SetEndSessionRequestCachingPolicy(DistributedCacheEntryOptions policy)
{
if (policy is null)
{
throw new ArgumentNullException(nameof(policy));
}
return Configure(options => options.EndSessionRequestCachingPolicy = policy);
}
/// <inheritdoc/>
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => base.Equals(obj);

17
src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreConstants.cs

@ -11,23 +11,6 @@ namespace OpenIddict.Server.AspNetCore;
/// </summary>
public static class OpenIddictServerAspNetCoreConstants
{
[Obsolete("This class is obsolete and will be removed in a future version.")]
public static class Cache
{
public const string AuthorizationRequest = "openiddict-authorization-request:";
public const string EndSessionRequest = "openiddict-end_session-request:";
}
[Obsolete("This class is obsolete and will be removed in a future version.")]
public static class JsonWebTokenTypes
{
public static class Private
{
public const string AuthorizationRequest = "oi_authrq+jwt";
public const string EndSessionRequest = "oi_endsessrq+jwt";
}
}
public static class Properties
{
public const string AccessTokenPrincipal = ".access_token_principal";

4
src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreExtensions.cs

@ -38,10 +38,6 @@ public static class OpenIddictServerAspNetCoreExtensions
builder.Services.TryAdd(OpenIddictServerAspNetCoreHandlers.DefaultHandlers.Select(descriptor => descriptor.ServiceDescriptor));
// Register the built-in filters used by the default OpenIddict ASP.NET Core server event handlers.
#pragma warning disable CS0618
builder.Services.TryAddSingleton<RequireAuthorizationRequestCachingEnabled>();
builder.Services.TryAddSingleton<RequireEndSessionRequestCachingEnabled>();
#pragma warning restore CS0618
builder.Services.TryAddSingleton<RequireAuthorizationEndpointPassthroughEnabled>();
builder.Services.TryAddSingleton<RequireEndSessionEndpointPassthroughEnabled>();
builder.Services.TryAddSingleton<RequireErrorPassthroughEnabled>();

46
src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlerFilters.cs

@ -16,29 +16,6 @@ namespace OpenIddict.Server.AspNetCore;
[EditorBrowsable(EditorBrowsableState.Advanced)]
public static class OpenIddictServerAspNetCoreHandlerFilters
{
/// <summary>
/// Represents a filter that excludes the associated handlers if authorization request caching was not enabled.
/// </summary>
[Obsolete("This filter is obsolete and will be removed in a future version.")]
public sealed class RequireAuthorizationRequestCachingEnabled : IOpenIddictServerHandlerFilter<BaseContext>
{
private readonly IOptionsMonitor<OpenIddictServerAspNetCoreOptions> _options;
public RequireAuthorizationRequestCachingEnabled(IOptionsMonitor<OpenIddictServerAspNetCoreOptions> options)
=> _options = options ?? throw new ArgumentNullException(nameof(options));
/// <inheritdoc/>
public ValueTask<bool> IsActiveAsync(BaseContext context)
{
if (context is null)
{
throw new ArgumentNullException(nameof(context));
}
return new(_options.CurrentValue.EnableAuthorizationRequestCaching);
}
}
/// <summary>
/// Represents a filter that excludes the associated handlers if the
/// pass-through mode was not enabled for the authorization endpoint.
@ -62,29 +39,6 @@ public static class OpenIddictServerAspNetCoreHandlerFilters
}
}
/// <summary>
/// Represents a filter that excludes the associated handlers if end session request caching was not enabled.
/// </summary>
[Obsolete("This filter is obsolete and will be removed in a future version.")]
public sealed class RequireEndSessionRequestCachingEnabled : IOpenIddictServerHandlerFilter<BaseContext>
{
private readonly IOptionsMonitor<OpenIddictServerAspNetCoreOptions> _options;
public RequireEndSessionRequestCachingEnabled(IOptionsMonitor<OpenIddictServerAspNetCoreOptions> options)
=> _options = options ?? throw new ArgumentNullException(nameof(options));
/// <inheritdoc/>
public ValueTask<bool> IsActiveAsync(BaseContext context)
{
if (context is null)
{
throw new ArgumentNullException(nameof(context));
}
return new(_options.CurrentValue.EnableEndSessionRequestCaching);
}
}
/// <summary>
/// Represents a filter that excludes the associated handlers if the
/// pass-through mode was not enabled for the end session endpoint.

91
src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Authentication.cs

@ -9,9 +9,7 @@ using System.Text;
using System.Text.Encodings.Web;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Microsoft.Net.Http.Headers;
namespace OpenIddict.Server.AspNetCore;
@ -61,95 +59,6 @@ public static partial class OpenIddictServerAspNetCoreHandlers
ProcessJsonResponse<ApplyPushedAuthorizationResponseContext>.Descriptor
];
/// <summary>
/// Contains the logic responsible for restoring cached requests from the request_id, if specified.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core.
/// </summary>
[Obsolete("This event handler is obsolete and will be removed in a future version.")]
public sealed class RestoreCachedRequestParameters : IOpenIddictServerHandler<ExtractAuthorizationRequestContext>
{
public RestoreCachedRequestParameters() => throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
public RestoreCachedRequestParameters(IDistributedCache cache)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
= OpenIddictServerHandlerDescriptor.CreateBuilder<ExtractAuthorizationRequestContext>()
.AddFilter<RequireHttpRequest>()
.AddFilter<RequireAuthorizationRequestCachingEnabled>()
.UseSingletonHandler<RestoreCachedRequestParameters>()
.SetOrder(ExtractGetOrPostRequest<ExtractAuthorizationRequestContext>.Descriptor.Order + 1_000)
.SetType(OpenIddictServerHandlerType.BuiltIn)
.Build();
/// <inheritdoc/>
public ValueTask HandleAsync(ExtractAuthorizationRequestContext context)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
}
/// <summary>
/// Contains the logic responsible for caching authorization requests, if applicable.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core.
/// </summary>
[Obsolete("This event handler is obsolete and will be removed in a future version.")]
public sealed class CacheRequestParameters : IOpenIddictServerHandler<ExtractAuthorizationRequestContext>
{
public CacheRequestParameters() => throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
public CacheRequestParameters(
IDistributedCache cache,
IOptionsMonitor<OpenIddictServerAspNetCoreOptions> options)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
= OpenIddictServerHandlerDescriptor.CreateBuilder<ExtractAuthorizationRequestContext>()
.AddFilter<RequireHttpRequest>()
.AddFilter<RequireAuthorizationRequestCachingEnabled>()
.UseSingletonHandler<CacheRequestParameters>()
.SetOrder(RestoreCachedRequestParameters.Descriptor.Order + 1_000)
.SetType(OpenIddictServerHandlerType.BuiltIn)
.Build();
/// <inheritdoc/>
public ValueTask HandleAsync(ExtractAuthorizationRequestContext context)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
}
/// <summary>
/// Contains the logic responsible for removing cached authorization requests from the distributed cache.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core.
/// </summary>
[Obsolete("This event handler is obsolete and will be removed in a future version.")]
public sealed class RemoveCachedRequest : IOpenIddictServerHandler<ApplyAuthorizationResponseContext>
{
public RemoveCachedRequest() => throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
public RemoveCachedRequest(IDistributedCache cache)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
= OpenIddictServerHandlerDescriptor.CreateBuilder<ApplyAuthorizationResponseContext>()
.AddFilter<RequireHttpRequest>()
.AddFilter<RequireAuthorizationRequestCachingEnabled>()
.UseSingletonHandler<RemoveCachedRequest>()
.SetOrder(int.MinValue + 100_000)
.SetType(OpenIddictServerHandlerType.BuiltIn)
.Build();
/// <inheritdoc/>
public ValueTask HandleAsync(ApplyAuthorizationResponseContext context)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
}
/// <summary>
/// Contains the logic responsible for processing authorization responses requiring a self-redirection.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core.

91
src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Session.cs

@ -7,9 +7,7 @@
using System.Collections.Immutable;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
namespace OpenIddict.Server.AspNetCore;
@ -43,95 +41,6 @@ public static partial class OpenIddictServerAspNetCoreHandlers
ProcessEmptyResponse<ApplyEndSessionResponseContext>.Descriptor
];
/// <summary>
/// Contains the logic responsible for restoring cached requests from the request_id, if specified.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core.
/// </summary>
[Obsolete("This event handler is obsolete and will be removed in a future version.")]
public sealed class RestoreCachedRequestParameters : IOpenIddictServerHandler<ExtractEndSessionRequestContext>
{
public RestoreCachedRequestParameters() => throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
public RestoreCachedRequestParameters(IDistributedCache cache)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
= OpenIddictServerHandlerDescriptor.CreateBuilder<ExtractEndSessionRequestContext>()
.AddFilter<RequireHttpRequest>()
.AddFilter<RequireEndSessionRequestCachingEnabled>()
.UseSingletonHandler<RestoreCachedRequestParameters>()
.SetOrder(ExtractGetOrPostRequest<ExtractEndSessionRequestContext>.Descriptor.Order + 1_000)
.SetType(OpenIddictServerHandlerType.BuiltIn)
.Build();
/// <inheritdoc/>
public ValueTask HandleAsync(ExtractEndSessionRequestContext context)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
}
/// <summary>
/// Contains the logic responsible for caching end session requests, if applicable.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core.
/// </summary>
[Obsolete("This event handler is obsolete and will be removed in a future version.")]
public sealed class CacheRequestParameters : IOpenIddictServerHandler<ExtractEndSessionRequestContext>
{
public CacheRequestParameters() => throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
public CacheRequestParameters(
IDistributedCache cache,
IOptionsMonitor<OpenIddictServerAspNetCoreOptions> options)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
= OpenIddictServerHandlerDescriptor.CreateBuilder<ExtractEndSessionRequestContext>()
.AddFilter<RequireHttpRequest>()
.AddFilter<RequireEndSessionRequestCachingEnabled>()
.UseSingletonHandler<CacheRequestParameters>()
.SetOrder(RestoreCachedRequestParameters.Descriptor.Order + 1_000)
.SetType(OpenIddictServerHandlerType.BuiltIn)
.Build();
/// <inheritdoc/>
public ValueTask HandleAsync(ExtractEndSessionRequestContext context)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
}
/// <summary>
/// Contains the logic responsible for removing cached end session requests from the distributed cache.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core.
/// </summary>
[Obsolete("This event handler is obsolete and will be removed in a future version.")]
public sealed class RemoveCachedRequest : IOpenIddictServerHandler<ApplyEndSessionResponseContext>
{
public RemoveCachedRequest() => throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
public RemoveCachedRequest(IDistributedCache cache)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
= OpenIddictServerHandlerDescriptor.CreateBuilder<ApplyEndSessionResponseContext>()
.AddFilter<RequireHttpRequest>()
.AddFilter<RequireEndSessionRequestCachingEnabled>()
.UseSingletonHandler<RemoveCachedRequest>()
.SetOrder(int.MinValue + 100_000)
.SetType(OpenIddictServerHandlerType.BuiltIn)
.Build();
/// <inheritdoc/>
public ValueTask HandleAsync(ApplyEndSessionResponseContext context)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
}
/// <summary>
/// Contains the logic responsible for processing end session responses requiring a self-redirection.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core.

38
src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs

@ -5,7 +5,6 @@
*/
using Microsoft.AspNetCore;
using Microsoft.Extensions.Caching.Distributed;
namespace OpenIddict.Server.AspNetCore;
@ -71,23 +70,6 @@ public sealed class OpenIddictServerAspNetCoreOptions : AuthenticationSchemeOpti
/// </summary>
public bool EnableUserInfoEndpointPassthrough { get; set; }
/// <summary>
/// Gets or sets a boolean indicating whether requests received by the authorization endpoint
/// should be cached. When enabled, authorization requests are automatically stored
/// in the distributed cache, which allows flowing large payloads across requests.
/// Enabling this option is recommended when using external authentication providers
/// or when large GET or POST OpenID Connect authorization requests support is required.
/// </summary>
[Obsolete("This property is obsolete and will be removed in a future version.")]
public bool EnableAuthorizationRequestCaching { get; set; }
/// <summary>
/// Gets or sets a boolean indicating whether requests received by the end session endpoint should be cached.
/// When enabled, authorization requests are automatically stored in the distributed cache.
/// </summary>
[Obsolete("This property is obsolete and will be removed in a future version.")]
public bool EnableEndSessionRequestCaching { get; set; }
/// <summary>
/// Gets or sets a boolean indicating whether integration with the status code pages
/// middleware should be enabled or not. Once enabled, errors generated by the OpenIddict
@ -104,24 +86,4 @@ public sealed class OpenIddictServerAspNetCoreOptions : AuthenticationSchemeOpti
/// Gets or sets the optional "realm" value returned to the caller as part of the WWW-Authenticate header.
/// </summary>
public string? Realm { get; set; }
/// <summary>
/// Gets or sets the caching policy used by the authorization endpoint.
/// </summary>
[Obsolete("This property is obsolete and will be removed in a future version.")]
public DistributedCacheEntryOptions AuthorizationRequestCachingPolicy { get; set; } = new()
{
AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1),
SlidingExpiration = TimeSpan.FromMinutes(30)
};
/// <summary>
/// Gets or sets the caching policy used by the end session endpoint.
/// </summary>
[Obsolete("This property is obsolete and will be removed in a future version.")]
public DistributedCacheEntryOptions EndSessionRequestCachingPolicy { get; set; } = new()
{
AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1),
SlidingExpiration = TimeSpan.FromMinutes(30)
};
}

1
src/OpenIddict.Server.Owin/OpenIddict.Server.Owin.csproj

@ -14,7 +14,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" />
<PackageReference Include="Microsoft.Extensions.WebEncoders" />
<PackageReference Include="Microsoft.Owin.Security" />
</ItemGroup>

65
src/OpenIddict.Server.Owin/OpenIddictServerOwinBuilder.cs

@ -5,8 +5,6 @@
*/
using System.ComponentModel;
using Microsoft.Extensions.Caching.Distributed;
using OpenIddict.Server;
using OpenIddict.Server.Owin;
using Owin;
@ -117,35 +115,6 @@ public sealed class OpenIddictServerOwinBuilder
public OpenIddictServerOwinBuilder EnableUserInfoEndpointPassthrough()
=> Configure(options => options.EnableUserInfoEndpointPassthrough = true);
/// <summary>
/// Enables authorization request caching, so that authorization requests
/// are automatically stored in the distributed cache, which allows flowing
/// large payloads across requests. Enabling this option is recommended
/// when using external authentication providers or when large GET or POST
/// OpenID Connect authorization requests support is required.
/// </summary>
/// <returns>The <see cref="OpenIddictServerOwinBuilder"/> instance.</returns>
[Obsolete("This method is obsolete and will be removed in a future version.")]
public OpenIddictServerOwinBuilder EnableAuthorizationRequestCaching()
{
Services.Configure<OpenIddictServerOptions>(options => options.EnableAuthorizationRequestCaching = true);
return this;
}
/// <summary>
/// Enables end session request caching, so that end session requests
/// are automatically stored in the distributed cache.
/// </summary>
/// <returns>The <see cref="OpenIddictServerOwinBuilder"/> instance.</returns>
[Obsolete("This method is obsolete and will be removed in a future version.")]
public OpenIddictServerOwinBuilder EnableEndSessionRequestCaching()
{
Services.Configure<OpenIddictServerOptions>(options => options.EnableEndSessionRequestCaching = true);
return this;
}
/// <summary>
/// Suppresses indentation for the JSON responses returned by the OWIN host.
/// </summary>
@ -168,40 +137,6 @@ public sealed class OpenIddictServerOwinBuilder
return Configure(options => options.Realm = realm);
}
/// <summary>
/// Sets the caching policy used by the authorization endpoint.
/// Note: the specified policy is only used when caching is explicitly enabled.
/// </summary>
/// <param name="policy">The caching policy.</param>
/// <returns>The <see cref="OpenIddictServerOwinBuilder"/> instance.</returns>
[Obsolete("This method is obsolete and will be removed in a future version.")]
public OpenIddictServerOwinBuilder SetAuthorizationRequestCachingPolicy(DistributedCacheEntryOptions policy)
{
if (policy is null)
{
throw new ArgumentNullException(nameof(policy));
}
return Configure(options => options.AuthorizationRequestCachingPolicy = policy);
}
/// <summary>
/// Sets the caching policy used by the end session endpoint.
/// Note: the specified policy is only used when caching is explicitly enabled.
/// </summary>
/// <param name="policy">The caching policy.</param>
/// <returns>The <see cref="OpenIddictServerOwinBuilder"/> instance.</returns>
[Obsolete("This method is obsolete and will be removed in a future version.")]
public OpenIddictServerOwinBuilder SetEndSessionRequestCachingPolicy(DistributedCacheEntryOptions policy)
{
if (policy is null)
{
throw new ArgumentNullException(nameof(policy));
}
return Configure(options => options.EndSessionRequestCachingPolicy = policy);
}
/// <inheritdoc/>
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => base.Equals(obj);

17
src/OpenIddict.Server.Owin/OpenIddictServerOwinConstants.cs

@ -11,13 +11,6 @@ namespace OpenIddict.Server.Owin;
/// </summary>
public static class OpenIddictServerOwinConstants
{
[Obsolete("This class is obsolete and will be removed in a future version.")]
public static class Cache
{
public const string AuthorizationRequest = "openiddict-authorization-request:";
public const string EndSessionRequest = "openiddict-end_session-request:";
}
public static class Headers
{
public const string Authorization = "Authorization";
@ -29,16 +22,6 @@ public static class OpenIddictServerOwinConstants
public const string WwwAuthenticate = "WWW-Authenticate";
}
[Obsolete("This class is obsolete and will be removed in a future version.")]
public static class JsonWebTokenTypes
{
public static class Private
{
public const string AuthorizationRequest = "oi_authrq+jwt";
public const string EndSessionRequest = "oi_endsessrq+jwt";
}
}
public static class Properties
{
public const string AccessTokenPrincipal = ".access_token_principal";

4
src/OpenIddict.Server.Owin/OpenIddictServerOwinExtensions.cs

@ -41,10 +41,6 @@ public static class OpenIddictServerOwinExtensions
builder.Services.TryAdd(OpenIddictServerOwinHandlers.DefaultHandlers.Select(descriptor => descriptor.ServiceDescriptor));
// Register the built-in filters used by the default OpenIddict OWIN server event handlers.
#pragma warning disable CS0618
builder.Services.TryAddSingleton<RequireAuthorizationRequestCachingEnabled>();
builder.Services.TryAddSingleton<RequireEndSessionRequestCachingEnabled>();
#pragma warning restore CS0618
builder.Services.TryAddSingleton<RequireAuthorizationEndpointPassthroughEnabled>();
builder.Services.TryAddSingleton<RequireEndSessionEndpointPassthroughEnabled>();
builder.Services.TryAddSingleton<RequireErrorPassthroughEnabled>();

46
src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlerFilters.cs

@ -14,29 +14,6 @@ namespace OpenIddict.Server.Owin;
/// </summary>
public static class OpenIddictServerOwinHandlerFilters
{
/// <summary>
/// Represents a filter that excludes the associated handlers if authorization request caching was not enabled.
/// </summary>
[Obsolete("This filter is obsolete and will be removed in a future version.")]
public sealed class RequireAuthorizationRequestCachingEnabled : IOpenIddictServerHandlerFilter<BaseContext>
{
private readonly IOptionsMonitor<OpenIddictServerOwinOptions> _options;
public RequireAuthorizationRequestCachingEnabled(IOptionsMonitor<OpenIddictServerOwinOptions> options)
=> _options = options ?? throw new ArgumentNullException(nameof(options));
/// <inheritdoc/>
public ValueTask<bool> IsActiveAsync(BaseContext context)
{
if (context is null)
{
throw new ArgumentNullException(nameof(context));
}
return new(_options.CurrentValue.EnableAuthorizationRequestCaching);
}
}
/// <summary>
/// Represents a filter that excludes the associated handlers if the
/// pass-through mode was not enabled for the authorization endpoint.
@ -60,29 +37,6 @@ public static class OpenIddictServerOwinHandlerFilters
}
}
/// <summary>
/// Represents a filter that excludes the associated handlers if end session request caching was not enabled.
/// </summary>
[Obsolete("This filter is obsolete and will be removed in a future version.")]
public sealed class RequireEndSessionRequestCachingEnabled : IOpenIddictServerHandlerFilter<BaseContext>
{
private readonly IOptionsMonitor<OpenIddictServerOwinOptions> _options;
public RequireEndSessionRequestCachingEnabled(IOptionsMonitor<OpenIddictServerOwinOptions> options)
=> _options = options ?? throw new ArgumentNullException(nameof(options));
/// <inheritdoc/>
public ValueTask<bool> IsActiveAsync(BaseContext context)
{
if (context is null)
{
throw new ArgumentNullException(nameof(context));
}
return new(_options.CurrentValue.EnableEndSessionRequestCaching);
}
}
/// <summary>
/// Represents a filter that excludes the associated handlers if the
/// pass-through mode was not enabled for the end session endpoint.

91
src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Authentication.cs

@ -7,9 +7,7 @@
using System.Collections.Immutable;
using System.Text;
using System.Text.Encodings.Web;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Owin;
using static OpenIddict.Server.Owin.OpenIddictServerOwinConstants;
@ -63,95 +61,6 @@ public static partial class OpenIddictServerOwinHandlers
ProcessJsonResponse<ApplyPushedAuthorizationResponseContext>.Descriptor,
];
/// <summary>
/// Contains the logic responsible for restoring cached requests from the request_id, if specified.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN.
/// </summary>
[Obsolete("This event handler is obsolete and will be removed in a future version.")]
public sealed class RestoreCachedRequestParameters : IOpenIddictServerHandler<ExtractAuthorizationRequestContext>
{
public RestoreCachedRequestParameters() => throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
public RestoreCachedRequestParameters(IDistributedCache cache)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
= OpenIddictServerHandlerDescriptor.CreateBuilder<ExtractAuthorizationRequestContext>()
.AddFilter<RequireOwinRequest>()
.AddFilter<RequireAuthorizationRequestCachingEnabled>()
.UseSingletonHandler<RestoreCachedRequestParameters>()
.SetOrder(ExtractGetOrPostRequest<ExtractAuthorizationRequestContext>.Descriptor.Order + 1_000)
.SetType(OpenIddictServerHandlerType.BuiltIn)
.Build();
/// <inheritdoc/>
public ValueTask HandleAsync(ExtractAuthorizationRequestContext context)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
}
/// <summary>
/// Contains the logic responsible for caching authorization requests, if applicable.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN.
/// </summary>
[Obsolete("This event handler is obsolete and will be removed in a future version.")]
public sealed class CacheRequestParameters : IOpenIddictServerHandler<ExtractAuthorizationRequestContext>
{
public CacheRequestParameters() => throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
public CacheRequestParameters(
IDistributedCache cache,
IOptionsMonitor<OpenIddictServerOwinOptions> options)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
= OpenIddictServerHandlerDescriptor.CreateBuilder<ExtractAuthorizationRequestContext>()
.AddFilter<RequireOwinRequest>()
.AddFilter<RequireAuthorizationRequestCachingEnabled>()
.UseSingletonHandler<CacheRequestParameters>()
.SetOrder(RestoreCachedRequestParameters.Descriptor.Order + 1_000)
.SetType(OpenIddictServerHandlerType.BuiltIn)
.Build();
/// <inheritdoc/>
public ValueTask HandleAsync(ExtractAuthorizationRequestContext context)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
}
/// <summary>
/// Contains the logic responsible for removing cached authorization requests from the distributed cache.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN.
/// </summary>
[Obsolete("This event handler is obsolete and will be removed in a future version.")]
public sealed class RemoveCachedRequest : IOpenIddictServerHandler<ApplyAuthorizationResponseContext>
{
public RemoveCachedRequest() => throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
public RemoveCachedRequest(IDistributedCache cache)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
= OpenIddictServerHandlerDescriptor.CreateBuilder<ApplyAuthorizationResponseContext>()
.AddFilter<RequireOwinRequest>()
.AddFilter<RequireAuthorizationRequestCachingEnabled>()
.UseSingletonHandler<RemoveCachedRequest>()
.SetOrder(int.MinValue + 100_000)
.SetType(OpenIddictServerHandlerType.BuiltIn)
.Build();
/// <inheritdoc/>
public ValueTask HandleAsync(ApplyAuthorizationResponseContext context)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
}
/// <summary>
/// Contains the logic responsible for processing authorization responses requiring a self-redirection.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN.

91
src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Session.cs

@ -5,9 +5,7 @@
*/
using System.Collections.Immutable;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Owin;
namespace OpenIddict.Server.Owin;
@ -43,95 +41,6 @@ public static partial class OpenIddictServerOwinHandlers
ProcessEmptyResponse<ApplyEndSessionResponseContext>.Descriptor
];
/// <summary>
/// Contains the logic responsible for restoring cached requests from the request_id, if specified.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN.
/// </summary>
[Obsolete("This event handler is obsolete and will be removed in a future version.")]
public sealed class RestoreCachedRequestParameters : IOpenIddictServerHandler<ExtractEndSessionRequestContext>
{
public RestoreCachedRequestParameters() => throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
public RestoreCachedRequestParameters(IDistributedCache cache)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
= OpenIddictServerHandlerDescriptor.CreateBuilder<ExtractEndSessionRequestContext>()
.AddFilter<RequireOwinRequest>()
.AddFilter<RequireEndSessionRequestCachingEnabled>()
.UseSingletonHandler<RestoreCachedRequestParameters>()
.SetOrder(ExtractGetOrPostRequest<ExtractEndSessionRequestContext>.Descriptor.Order + 1_000)
.SetType(OpenIddictServerHandlerType.BuiltIn)
.Build();
/// <inheritdoc/>
public ValueTask HandleAsync(ExtractEndSessionRequestContext context)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
}
/// <summary>
/// Contains the logic responsible for caching end session requests, if applicable.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN.
/// </summary>
[Obsolete("This event handler is obsolete and will be removed in a future version.")]
public sealed class CacheRequestParameters : IOpenIddictServerHandler<ExtractEndSessionRequestContext>
{
public CacheRequestParameters() => throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
public CacheRequestParameters(
IDistributedCache cache,
IOptionsMonitor<OpenIddictServerOwinOptions> options)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
= OpenIddictServerHandlerDescriptor.CreateBuilder<ExtractEndSessionRequestContext>()
.AddFilter<RequireOwinRequest>()
.AddFilter<RequireEndSessionRequestCachingEnabled>()
.UseSingletonHandler<CacheRequestParameters>()
.SetOrder(RestoreCachedRequestParameters.Descriptor.Order + 1_000)
.SetType(OpenIddictServerHandlerType.BuiltIn)
.Build();
/// <inheritdoc/>
public ValueTask HandleAsync(ExtractEndSessionRequestContext context)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
}
/// <summary>
/// Contains the logic responsible for removing cached end session requests from the distributed cache.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN.
/// </summary>
[Obsolete("This event handler is obsolete and will be removed in a future version.")]
public sealed class RemoveCachedRequest : IOpenIddictServerHandler<ApplyEndSessionResponseContext>
{
public RemoveCachedRequest() => throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
public RemoveCachedRequest(IDistributedCache cache)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
= OpenIddictServerHandlerDescriptor.CreateBuilder<ApplyEndSessionResponseContext>()
.AddFilter<RequireOwinRequest>()
.AddFilter<RequireEndSessionRequestCachingEnabled>()
.UseSingletonHandler<RemoveCachedRequest>()
.SetOrder(int.MinValue + 100_000)
.SetType(OpenIddictServerHandlerType.BuiltIn)
.Build();
/// <inheritdoc/>
public ValueTask HandleAsync(ApplyEndSessionResponseContext context)
=> throw new NotSupportedException(SR.GetResourceString(SR.ID0403));
}
/// <summary>
/// Contains the logic responsible for processing end session responses requiring a self-redirection.
/// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN.

38
src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs

@ -4,7 +4,6 @@
* the license and the contributors participating to this project.
*/
using Microsoft.Extensions.Caching.Distributed;
using Owin;
namespace OpenIddict.Server.Owin;
@ -75,23 +74,6 @@ public sealed class OpenIddictServerOwinOptions : AuthenticationOptions
/// </summary>
public bool EnableUserInfoEndpointPassthrough { get; set; }
/// <summary>
/// Gets or sets a boolean indicating whether requests received by the authorization endpoint
/// should be cached. When enabled, authorization requests are automatically stored
/// in the distributed cache, which allows flowing large payloads across requests.
/// Enabling this option is recommended when using external authentication providers
/// or when large GET or POST OpenID Connect authorization requests support is required.
/// </summary>
[Obsolete("This property is obsolete and will be removed in a future version.")]
public bool EnableAuthorizationRequestCaching { get; set; }
/// <summary>
/// Gets or sets a boolean indicating whether requests received by the end session endpoint should be cached.
/// When enabled, authorization requests are automatically stored in the distributed cache.
/// </summary>
[Obsolete("This property is obsolete and will be removed in a future version.")]
public bool EnableEndSessionRequestCaching { get; set; }
/// <summary>
/// Gets or sets a boolean whether JSON response indentation should be suppressed or not.
/// </summary>
@ -101,24 +83,4 @@ public sealed class OpenIddictServerOwinOptions : AuthenticationOptions
/// Gets or sets the optional "realm" value returned to the caller as part of the WWW-Authenticate header.
/// </summary>
public string? Realm { get; set; }
/// <summary>
/// Gets or sets the caching policy used by the authorization endpoint.
/// </summary>
[Obsolete("This property is obsolete and will be removed in a future version.")]
public DistributedCacheEntryOptions AuthorizationRequestCachingPolicy { get; set; } = new()
{
AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1),
SlidingExpiration = TimeSpan.FromMinutes(30)
};
/// <summary>
/// Gets or sets the caching policy used by the end session endpoint.
/// </summary>
[Obsolete("This property is obsolete and will be removed in a future version.")]
public DistributedCacheEntryOptions EndSessionRequestCachingPolicy { get; set; } = new()
{
AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1),
SlidingExpiration = TimeSpan.FromMinutes(30)
};
}

Loading…
Cancel
Save