From 921ad7f779c5fe077368f5717ab8907cae4cec3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Chalet?= Date: Fri, 2 Oct 2020 12:38:29 +0200 Subject: [PATCH] Rename Enable*EndpointCaching to Enable*RequestCaching --- .../OpenIddictServerAspNetCoreBuilder.cs | 20 +++++++++---------- .../OpenIddictServerAspNetCoreExtensions.cs | 4 ++-- ...penIddictServerAspNetCoreHandlerFilters.cs | 16 +++++++-------- ...ServerAspNetCoreHandlers.Authentication.cs | 8 ++++---- ...nIddictServerAspNetCoreHandlers.Session.cs | 8 ++++---- .../OpenIddictServerAspNetCoreOptions.cs | 8 ++++---- .../OpenIddictServerOwinBuilder.cs | 20 +++++++++---------- .../OpenIddictServerOwinExtensions.cs | 4 ++-- .../OpenIddictServerOwinHandlerFilters.cs | 16 +++++++-------- ...IddictServerOwinHandlers.Authentication.cs | 8 ++++---- .../OpenIddictServerOwinHandlers.Session.cs | 8 ++++---- .../OpenIddictServerOwinOptions.cs | 8 ++++---- ...pNetCoreIntegrationTests.Authentication.cs | 2 +- ...erverAspNetCoreIntegrationTests.Session.cs | 2 +- ...rverOwinIntegrationTests.Authentication.cs | 2 +- ...ddictServerOwinIntegrationTests.Session.cs | 2 +- 16 files changed, 68 insertions(+), 68 deletions(-) diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreBuilder.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreBuilder.cs index d898a06b..34a6a0e9 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreBuilder.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreBuilder.cs @@ -123,23 +123,23 @@ namespace Microsoft.Extensions.DependencyInjection => Configure(options => options.EnableVerificationEndpointPassthrough = true); /// - /// Enables authorization endpoint caching, so that authorization requests + /// 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. /// /// The . - public OpenIddictServerAspNetCoreBuilder EnableAuthorizationEndpointCaching() - => Configure(options => options.EnableAuthorizationEndpointCaching = true); + public OpenIddictServerAspNetCoreBuilder EnableAuthorizationRequestCaching() + => Configure(options => options.EnableAuthorizationRequestCaching = true); /// - /// Enables logout endpoint caching, so that logout requests + /// Enables logout request caching, so that logout requests /// are automatically stored in the distributed cache. /// /// The . - public OpenIddictServerAspNetCoreBuilder EnableLogoutEndpointCaching() - => Configure(options => options.EnableLogoutEndpointCaching = true); + public OpenIddictServerAspNetCoreBuilder EnableLogoutRequestCaching() + => Configure(options => options.EnableLogoutRequestCaching = true); /// /// Enables status code pages integration support. Once enabled, errors @@ -170,14 +170,14 @@ namespace Microsoft.Extensions.DependencyInjection /// /// The caching policy. /// The . - public OpenIddictServerAspNetCoreBuilder SetAuthorizationEndpointCachingPolicy(DistributedCacheEntryOptions policy) + public OpenIddictServerAspNetCoreBuilder SetAuthorizationRequestCachingPolicy(DistributedCacheEntryOptions policy) { if (policy is null) { throw new ArgumentNullException(nameof(policy)); } - return Configure(options => options.AuthorizationEndpointCachingPolicy = policy); + return Configure(options => options.AuthorizationRequestCachingPolicy = policy); } /// @@ -186,14 +186,14 @@ namespace Microsoft.Extensions.DependencyInjection /// /// The caching policy. /// The . - public OpenIddictServerAspNetCoreBuilder SetLogoutEndpointCachingPolicy(DistributedCacheEntryOptions policy) + public OpenIddictServerAspNetCoreBuilder SetLogoutRequestCachingPolicy(DistributedCacheEntryOptions policy) { if (policy is null) { throw new ArgumentNullException(nameof(policy)); } - return Configure(options => options.LogoutEndpointCachingPolicy = policy); + return Configure(options => options.LogoutRequestCachingPolicy = policy); } /// diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreExtensions.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreExtensions.cs index a7cb2bba..caa33dee 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreExtensions.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreExtensions.cs @@ -43,11 +43,11 @@ namespace Microsoft.Extensions.DependencyInjection builder.Services.TryAdd(DefaultHandlers.Select(descriptor => descriptor.ServiceDescriptor)); // Register the built-in filters used by the default OpenIddict ASP.NET Core server event handlers. - builder.Services.TryAddSingleton(); + builder.Services.TryAddSingleton(); builder.Services.TryAddSingleton(); builder.Services.TryAddSingleton(); builder.Services.TryAddSingleton(); - builder.Services.TryAddSingleton(); + builder.Services.TryAddSingleton(); builder.Services.TryAddSingleton(); builder.Services.TryAddSingleton(); builder.Services.TryAddSingleton(); diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlerFilters.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlerFilters.cs index 98dfdff1..3f7b3473 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlerFilters.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlerFilters.cs @@ -20,13 +20,13 @@ namespace OpenIddict.Server.AspNetCore public static class OpenIddictServerAspNetCoreHandlerFilters { /// - /// Represents a filter that excludes the associated handlers if authorization endpoint caching was not enabled. + /// Represents a filter that excludes the associated handlers if authorization request caching was not enabled. /// - public class RequireAuthorizationEndpointCachingEnabled : IOpenIddictServerHandlerFilter + public class RequireAuthorizationRequestCachingEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; - public RequireAuthorizationEndpointCachingEnabled(IOptionsMonitor options) + public RequireAuthorizationRequestCachingEnabled(IOptionsMonitor options) => _options = options; public ValueTask IsActiveAsync(BaseContext context) @@ -36,7 +36,7 @@ namespace OpenIddict.Server.AspNetCore throw new ArgumentNullException(nameof(context)); } - return new ValueTask(_options.CurrentValue.EnableAuthorizationEndpointCaching); + return new ValueTask(_options.CurrentValue.EnableAuthorizationRequestCaching); } } @@ -100,13 +100,13 @@ namespace OpenIddict.Server.AspNetCore } /// - /// Represents a filter that excludes the associated handlers if logout endpoint caching was not enabled. + /// Represents a filter that excludes the associated handlers if logout request caching was not enabled. /// - public class RequireLogoutEndpointCachingEnabled : IOpenIddictServerHandlerFilter + public class RequireLogoutRequestCachingEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; - public RequireLogoutEndpointCachingEnabled(IOptionsMonitor options) + public RequireLogoutRequestCachingEnabled(IOptionsMonitor options) => _options = options; public ValueTask IsActiveAsync(BaseContext context) @@ -116,7 +116,7 @@ namespace OpenIddict.Server.AspNetCore throw new ArgumentNullException(nameof(context)); } - return new ValueTask(_options.CurrentValue.EnableLogoutEndpointCaching); + return new ValueTask(_options.CurrentValue.EnableLogoutRequestCaching); } } diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Authentication.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Authentication.cs index b9edd910..e2ce61bd 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Authentication.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Authentication.cs @@ -81,7 +81,7 @@ namespace OpenIddict.Server.AspNetCore public static OpenIddictServerHandlerDescriptor Descriptor { get; } = OpenIddictServerHandlerDescriptor.CreateBuilder() .AddFilter() - .AddFilter() + .AddFilter() .UseSingletonHandler() .SetOrder(ExtractGetOrPostRequest.Descriptor.Order + 1_000) .SetType(OpenIddictServerHandlerType.BuiltIn) @@ -182,7 +182,7 @@ namespace OpenIddict.Server.AspNetCore public static OpenIddictServerHandlerDescriptor Descriptor { get; } = OpenIddictServerHandlerDescriptor.CreateBuilder() .AddFilter() - .AddFilter() + .AddFilter() .UseSingletonHandler() .SetOrder(RestoreCachedRequestParameters.Descriptor.Order + 1_000) .SetType(OpenIddictServerHandlerType.BuiltIn) @@ -252,7 +252,7 @@ namespace OpenIddict.Server.AspNetCore // Note: the cache key is always prefixed with a specific marker // to avoid collisions with the other types of cached payloads. await _cache.SetStringAsync(Cache.AuthorizationRequest + context.Request.RequestId, - token, _options.CurrentValue.AuthorizationEndpointCachingPolicy); + token, _options.CurrentValue.AuthorizationRequestCachingPolicy); // Create a new GET authorization request containing only the request_id parameter. var address = QueryHelpers.AddQueryString( @@ -286,7 +286,7 @@ namespace OpenIddict.Server.AspNetCore public static OpenIddictServerHandlerDescriptor Descriptor { get; } = OpenIddictServerHandlerDescriptor.CreateBuilder() .AddFilter() - .AddFilter() + .AddFilter() .UseSingletonHandler() .SetOrder(int.MinValue + 100_000) .SetType(OpenIddictServerHandlerType.BuiltIn) diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Session.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Session.cs index e9e03cdb..832852f6 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Session.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Session.cs @@ -79,7 +79,7 @@ namespace OpenIddict.Server.AspNetCore public static OpenIddictServerHandlerDescriptor Descriptor { get; } = OpenIddictServerHandlerDescriptor.CreateBuilder() .AddFilter() - .AddFilter() + .AddFilter() .UseSingletonHandler() .SetOrder(ExtractGetOrPostRequest.Descriptor.Order + 1_000) .SetType(OpenIddictServerHandlerType.BuiltIn) @@ -180,7 +180,7 @@ namespace OpenIddict.Server.AspNetCore public static OpenIddictServerHandlerDescriptor Descriptor { get; } = OpenIddictServerHandlerDescriptor.CreateBuilder() .AddFilter() - .AddFilter() + .AddFilter() .UseSingletonHandler() .SetOrder(RestoreCachedRequestParameters.Descriptor.Order + 1_000) .SetType(OpenIddictServerHandlerType.BuiltIn) @@ -250,7 +250,7 @@ namespace OpenIddict.Server.AspNetCore // Note: the cache key is always prefixed with a specific marker // to avoid collisions with the other types of cached payloads. await _cache.SetStringAsync(Cache.LogoutRequest + context.Request.RequestId, - token, _options.CurrentValue.LogoutEndpointCachingPolicy); + token, _options.CurrentValue.LogoutRequestCachingPolicy); // Create a new GET logout request containing only the request_id parameter. var address = QueryHelpers.AddQueryString( @@ -284,7 +284,7 @@ namespace OpenIddict.Server.AspNetCore public static OpenIddictServerHandlerDescriptor Descriptor { get; } = OpenIddictServerHandlerDescriptor.CreateBuilder() .AddFilter() - .AddFilter() + .AddFilter() .UseSingletonHandler() .SetOrder(int.MinValue + 100_000) .SetType(OpenIddictServerHandlerType.BuiltIn) diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs index 3ca20c04..cec5c73a 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs @@ -81,13 +81,13 @@ namespace OpenIddict.Server.AspNetCore /// Enabling this option is recommended when using external authentication providers /// or when large GET or POST OpenID Connect authorization requests support is required. /// - public bool EnableAuthorizationEndpointCaching { get; set; } + public bool EnableAuthorizationRequestCaching { get; set; } /// /// Gets or sets a boolean indicating whether requests received by the logout endpoint should be cached. /// When enabled, authorization requests are automatically stored in the distributed cache. /// - public bool EnableLogoutEndpointCaching { get; set; } + public bool EnableLogoutRequestCaching { get; set; } /// /// Gets or sets a boolean indicating whether integration with the status code pages @@ -104,7 +104,7 @@ namespace OpenIddict.Server.AspNetCore /// /// Gets or sets the caching policy used by the authorization endpoint. /// - public DistributedCacheEntryOptions AuthorizationEndpointCachingPolicy { get; set; } = new DistributedCacheEntryOptions + public DistributedCacheEntryOptions AuthorizationRequestCachingPolicy { get; set; } = new DistributedCacheEntryOptions { AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1), SlidingExpiration = TimeSpan.FromMinutes(30) @@ -113,7 +113,7 @@ namespace OpenIddict.Server.AspNetCore /// /// Gets or sets the caching policy used by the logout endpoint. /// - public DistributedCacheEntryOptions LogoutEndpointCachingPolicy { get; set; } = new DistributedCacheEntryOptions + public DistributedCacheEntryOptions LogoutRequestCachingPolicy { get; set; } = new DistributedCacheEntryOptions { AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1), SlidingExpiration = TimeSpan.FromMinutes(30) diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinBuilder.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinBuilder.cs index 0a8ab5e2..8062c6e9 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinBuilder.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinBuilder.cs @@ -120,23 +120,23 @@ namespace Microsoft.Extensions.DependencyInjection => Configure(options => options.EnableVerificationEndpointPassthrough = true); /// - /// Enables authorization endpoint caching, so that authorization requests + /// 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. /// /// The . - public OpenIddictServerOwinBuilder EnableAuthorizationEndpointCaching() - => Configure(options => options.EnableAuthorizationEndpointCaching = true); + public OpenIddictServerOwinBuilder EnableAuthorizationRequestCaching() + => Configure(options => options.EnableAuthorizationRequestCaching = true); /// - /// Enables logout endpoint caching, so that logout requests + /// Enables logout request caching, so that logout requests /// are automatically stored in the distributed cache. /// /// The . - public OpenIddictServerOwinBuilder EnableLogoutEndpointCaching() - => Configure(options => options.EnableLogoutEndpointCaching = true); + public OpenIddictServerOwinBuilder EnableLogoutRequestCaching() + => Configure(options => options.EnableLogoutRequestCaching = true); /// /// Sets the realm returned to the caller as part of the WWW-Authenticate header. @@ -159,14 +159,14 @@ namespace Microsoft.Extensions.DependencyInjection /// /// The caching policy. /// The . - public OpenIddictServerOwinBuilder SetAuthorizationEndpointCachingPolicy(DistributedCacheEntryOptions policy) + public OpenIddictServerOwinBuilder SetAuthorizationRequestCachingPolicy(DistributedCacheEntryOptions policy) { if (policy is null) { throw new ArgumentNullException(nameof(policy)); } - return Configure(options => options.AuthorizationEndpointCachingPolicy = policy); + return Configure(options => options.AuthorizationRequestCachingPolicy = policy); } /// @@ -175,14 +175,14 @@ namespace Microsoft.Extensions.DependencyInjection /// /// The caching policy. /// The . - public OpenIddictServerOwinBuilder SetLogoutEndpointCachingPolicy(DistributedCacheEntryOptions policy) + public OpenIddictServerOwinBuilder SetLogoutRequestCachingPolicy(DistributedCacheEntryOptions policy) { if (policy is null) { throw new ArgumentNullException(nameof(policy)); } - return Configure(options => options.LogoutEndpointCachingPolicy = policy); + return Configure(options => options.LogoutRequestCachingPolicy = policy); } /// diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinExtensions.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinExtensions.cs index 4b6a8515..cc99dff1 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinExtensions.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinExtensions.cs @@ -45,10 +45,10 @@ namespace Microsoft.Extensions.DependencyInjection builder.Services.TryAdd(DefaultHandlers.Select(descriptor => descriptor.ServiceDescriptor)); // Register the built-in filters used by the default OpenIddict OWIN server event handlers. - builder.Services.TryAddSingleton(); + builder.Services.TryAddSingleton(); builder.Services.TryAddSingleton(); builder.Services.TryAddSingleton(); - builder.Services.TryAddSingleton(); + builder.Services.TryAddSingleton(); builder.Services.TryAddSingleton(); builder.Services.TryAddSingleton(); builder.Services.TryAddSingleton(); diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlerFilters.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlerFilters.cs index 88abb625..b2a26f1f 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlerFilters.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlerFilters.cs @@ -18,13 +18,13 @@ namespace OpenIddict.Server.Owin public static class OpenIddictServerOwinHandlerFilters { /// - /// Represents a filter that excludes the associated handlers if authorization endpoint caching was not enabled. + /// Represents a filter that excludes the associated handlers if authorization request caching was not enabled. /// - public class RequireAuthorizationEndpointCachingEnabled : IOpenIddictServerHandlerFilter + public class RequireAuthorizationRequestCachingEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; - public RequireAuthorizationEndpointCachingEnabled(IOptionsMonitor options) + public RequireAuthorizationRequestCachingEnabled(IOptionsMonitor options) => _options = options; public ValueTask IsActiveAsync(BaseContext context) @@ -34,7 +34,7 @@ namespace OpenIddict.Server.Owin throw new ArgumentNullException(nameof(context)); } - return new ValueTask(_options.CurrentValue.EnableAuthorizationEndpointCaching); + return new ValueTask(_options.CurrentValue.EnableAuthorizationRequestCaching); } } @@ -82,13 +82,13 @@ namespace OpenIddict.Server.Owin } /// - /// Represents a filter that excludes the associated handlers if logout endpoint caching was not enabled. + /// Represents a filter that excludes the associated handlers if logout request caching was not enabled. /// - public class RequireLogoutEndpointCachingEnabled : IOpenIddictServerHandlerFilter + public class RequireLogoutRequestCachingEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; - public RequireLogoutEndpointCachingEnabled(IOptionsMonitor options) + public RequireLogoutRequestCachingEnabled(IOptionsMonitor options) => _options = options; public ValueTask IsActiveAsync(BaseContext context) @@ -98,7 +98,7 @@ namespace OpenIddict.Server.Owin throw new ArgumentNullException(nameof(context)); } - return new ValueTask(_options.CurrentValue.EnableLogoutEndpointCaching); + return new ValueTask(_options.CurrentValue.EnableLogoutRequestCaching); } } diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Authentication.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Authentication.cs index a92a63b1..f1d8145f 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Authentication.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Authentication.cs @@ -80,7 +80,7 @@ namespace OpenIddict.Server.Owin public static OpenIddictServerHandlerDescriptor Descriptor { get; } = OpenIddictServerHandlerDescriptor.CreateBuilder() .AddFilter() - .AddFilter() + .AddFilter() .UseSingletonHandler() .SetOrder(ExtractGetOrPostRequest.Descriptor.Order + 1_000) .SetType(OpenIddictServerHandlerType.BuiltIn) @@ -181,7 +181,7 @@ namespace OpenIddict.Server.Owin public static OpenIddictServerHandlerDescriptor Descriptor { get; } = OpenIddictServerHandlerDescriptor.CreateBuilder() .AddFilter() - .AddFilter() + .AddFilter() .UseSingletonHandler() .SetOrder(RestoreCachedRequestParameters.Descriptor.Order + 1_000) .SetType(OpenIddictServerHandlerType.BuiltIn) @@ -246,7 +246,7 @@ namespace OpenIddict.Server.Owin // Note: the cache key is always prefixed with a specific marker // to avoid collisions with the other types of cached payloads. await _cache.SetStringAsync(Cache.AuthorizationRequest + context.Request.RequestId, - token, _options.CurrentValue.AuthorizationEndpointCachingPolicy); + token, _options.CurrentValue.AuthorizationRequestCachingPolicy); // Create a new GET authorization request containing only the request_id parameter. var address = WebUtilities.AddQueryString( @@ -280,7 +280,7 @@ namespace OpenIddict.Server.Owin public static OpenIddictServerHandlerDescriptor Descriptor { get; } = OpenIddictServerHandlerDescriptor.CreateBuilder() .AddFilter() - .AddFilter() + .AddFilter() .UseSingletonHandler() .SetOrder(int.MinValue + 100_000) .SetType(OpenIddictServerHandlerType.BuiltIn) diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Session.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Session.cs index c60f799e..daed01e9 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Session.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Session.cs @@ -78,7 +78,7 @@ namespace OpenIddict.Server.Owin public static OpenIddictServerHandlerDescriptor Descriptor { get; } = OpenIddictServerHandlerDescriptor.CreateBuilder() .AddFilter() - .AddFilter() + .AddFilter() .UseSingletonHandler() .SetOrder(ExtractGetOrPostRequest.Descriptor.Order + 1_000) .SetType(OpenIddictServerHandlerType.BuiltIn) @@ -179,7 +179,7 @@ namespace OpenIddict.Server.Owin public static OpenIddictServerHandlerDescriptor Descriptor { get; } = OpenIddictServerHandlerDescriptor.CreateBuilder() .AddFilter() - .AddFilter() + .AddFilter() .UseSingletonHandler() .SetOrder(RestoreCachedRequestParameters.Descriptor.Order + 1_000) .SetType(OpenIddictServerHandlerType.BuiltIn) @@ -244,7 +244,7 @@ namespace OpenIddict.Server.Owin // Note: the cache key is always prefixed with a specific marker // to avoid collisions with the other types of cached payloads. await _cache.SetStringAsync(Cache.LogoutRequest + context.Request.RequestId, - token, _options.CurrentValue.LogoutEndpointCachingPolicy); + token, _options.CurrentValue.LogoutRequestCachingPolicy); // Create a new GET logout request containing only the request_id parameter. var address = WebUtilities.AddQueryString( @@ -278,7 +278,7 @@ namespace OpenIddict.Server.Owin public static OpenIddictServerHandlerDescriptor Descriptor { get; } = OpenIddictServerHandlerDescriptor.CreateBuilder() .AddFilter() - .AddFilter() + .AddFilter() .UseSingletonHandler() .SetOrder(int.MinValue + 100_000) .SetType(OpenIddictServerHandlerType.BuiltIn) diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs index 8cebf61f..1331432f 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs @@ -85,13 +85,13 @@ namespace OpenIddict.Server.Owin /// Enabling this option is recommended when using external authentication providers /// or when large GET or POST OpenID Connect authorization requests support is required. /// - public bool EnableAuthorizationEndpointCaching { get; set; } + public bool EnableAuthorizationRequestCaching { get; set; } /// /// Gets or sets a boolean indicating whether requests received by the logout endpoint should be cached. /// When enabled, authorization requests are automatically stored in the distributed cache. /// - public bool EnableLogoutEndpointCaching { get; set; } + public bool EnableLogoutRequestCaching { get; set; } /// /// Gets or sets the optional "realm" value returned to the caller as part of the WWW-Authenticate header. @@ -101,7 +101,7 @@ namespace OpenIddict.Server.Owin /// /// Gets or sets the caching policy used by the authorization endpoint. /// - public DistributedCacheEntryOptions AuthorizationEndpointCachingPolicy { get; set; } = new DistributedCacheEntryOptions + public DistributedCacheEntryOptions AuthorizationRequestCachingPolicy { get; set; } = new DistributedCacheEntryOptions { AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1), SlidingExpiration = TimeSpan.FromMinutes(30) @@ -110,7 +110,7 @@ namespace OpenIddict.Server.Owin /// /// Gets or sets the caching policy used by the logout endpoint. /// - public DistributedCacheEntryOptions LogoutEndpointCachingPolicy { get; set; } = new DistributedCacheEntryOptions + public DistributedCacheEntryOptions LogoutRequestCachingPolicy { get; set; } = new DistributedCacheEntryOptions { AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1), SlidingExpiration = TimeSpan.FromMinutes(30) diff --git a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Authentication.cs b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Authentication.cs index dc8a9216..0b1a79bd 100644 --- a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Authentication.cs +++ b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Authentication.cs @@ -43,7 +43,7 @@ namespace OpenIddict.Server.AspNetCore.IntegrationTests options.Services.AddDistributedMemoryCache(); options.UseAspNetCore() - .EnableAuthorizationEndpointCaching(); + .EnableAuthorizationRequestCaching(); }); await using var client = await server.CreateClientAsync(); diff --git a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Session.cs b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Session.cs index 3e874d81..be3a6588 100644 --- a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Session.cs +++ b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Session.cs @@ -43,7 +43,7 @@ namespace OpenIddict.Server.AspNetCore.IntegrationTests options.Services.AddDistributedMemoryCache(); options.UseAspNetCore() - .EnableLogoutEndpointCaching(); + .EnableLogoutRequestCaching(); }); await using var client = await server.CreateClientAsync(); diff --git a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Authentication.cs b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Authentication.cs index d81d66d5..4bf34c3b 100644 --- a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Authentication.cs +++ b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Authentication.cs @@ -43,7 +43,7 @@ namespace OpenIddict.Server.Owin.IntegrationTests options.Services.AddDistributedMemoryCache(); options.UseOwin() - .EnableAuthorizationEndpointCaching(); + .EnableAuthorizationRequestCaching(); }); await using var client = await server.CreateClientAsync(); diff --git a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Session.cs b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Session.cs index 7f01e8f1..bf24a93f 100644 --- a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Session.cs +++ b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Session.cs @@ -43,7 +43,7 @@ namespace OpenIddict.Server.Owin.IntegrationTests options.Services.AddDistributedMemoryCache(); options.UseOwin() - .EnableLogoutEndpointCaching(); + .EnableLogoutRequestCaching(); }); await using var client = await server.CreateClientAsync();