From 51c09bec8a3bea75d8d72ad5c18c81d4e40e5a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Chalet?= Date: Tue, 8 Nov 2022 19:40:24 +0100 Subject: [PATCH] Mark most of the infrastructure types as sealed --- ...OpenIddictClientWebIntegrationGenerator.cs | 18 +- .../OpenIddictBuilder.cs | 2 +- .../OpenIddictExceptions.cs | 6 +- .../Primitives/OpenIddictConfiguration.cs | 7 +- .../Primitives/OpenIddictConverter.cs | 2 +- .../OpenIddictClientAspNetCoreBuilder.cs | 2 +- ...OpenIddictClientAspNetCoreConfiguration.cs | 6 +- .../OpenIddictClientAspNetCoreFeature.cs | 2 +- .../OpenIddictClientAspNetCoreHandler.cs | 2 +- ...penIddictClientAspNetCoreHandlerFilters.cs | 10 +- ...ClientAspNetCoreHandlers.Authentication.cs | 2 +- ...nIddictClientAspNetCoreHandlers.Session.cs | 2 +- .../OpenIddictClientAspNetCoreHandlers.cs | 30 ++-- .../OpenIddictClientAspNetCoreOptions.cs | 2 +- .../OpenIddictClientDataProtectionBuilder.cs | 2 +- ...IddictClientDataProtectionConfiguration.cs | 4 +- ...OpenIddictClientDataProtectionFormatter.cs | 2 +- ...ddictClientDataProtectionHandlerFilters.cs | 2 +- ...ClientDataProtectionHandlers.Protection.cs | 6 +- .../OpenIddictClientDataProtectionOptions.cs | 2 +- .../OpenIddictClientOwinBuilder.cs | 2 +- .../OpenIddictClientOwinConfiguration.cs | 4 +- .../OpenIddictClientOwinHandler.cs | 2 +- .../OpenIddictClientOwinHandlerFilters.cs | 8 +- ...IddictClientOwinHandlers.Authentication.cs | 2 +- .../OpenIddictClientOwinHandlers.Session.cs | 2 +- .../OpenIddictClientOwinHandlers.cs | 32 ++-- .../OpenIddictClientOwinMiddleware.cs | 2 +- .../OpenIddictClientOwinMiddlewareFactory.cs | 2 +- .../OpenIddictClientOwinOptions.cs | 2 +- .../OpenIddictClientSystemNetHttpBuilder.cs | 2 +- ...nIddictClientSystemNetHttpConfiguration.cs | 4 +- ...IddictClientSystemNetHttpHandlerFilters.cs | 2 +- ...ictClientSystemNetHttpHandlers.Exchange.cs | 2 +- ...ictClientSystemNetHttpHandlers.Userinfo.cs | 4 +- .../OpenIddictClientSystemNetHttpHandlers.cs | 26 +-- .../OpenIddictClientSystemNetHttpOptions.cs | 2 +- .../OpenIddictClientWebIntegrationBuilder.cs | 4 +- ...IddictClientWebIntegrationConfiguration.cs | 2 +- ...tClientWebIntegrationHandlers.Discovery.cs | 8 +- ...ctClientWebIntegrationHandlers.Exchange.cs | 4 +- ...ClientWebIntegrationHandlers.Protection.cs | 2 +- ...ctClientWebIntegrationHandlers.Userinfo.cs | 4 +- .../OpenIddictClientWebIntegrationHandlers.cs | 18 +- .../OpenIddictClientWebIntegrationOptions.cs | 2 +- .../OpenIddictClientBuilder.cs | 2 +- .../OpenIddictClientConfiguration.cs | 2 +- .../OpenIddictClientDispatcher.cs | 2 +- .../OpenIddictClientEvents.Authentication.cs | 12 +- .../OpenIddictClientEvents.Discovery.cs | 16 +- .../OpenIddictClientEvents.Exchange.cs | 8 +- .../OpenIddictClientEvents.Protection.cs | 4 +- .../OpenIddictClientEvents.Session.cs | 12 +- .../OpenIddictClientEvents.Userinfo.cs | 8 +- .../OpenIddictClientEvents.cs | 10 +- .../OpenIddictClientFactory.cs | 2 +- .../OpenIddictClientHandler.cs | 2 +- .../OpenIddictClientHandlerDescriptor.cs | 4 +- .../OpenIddictClientHandlerFilters.cs | 48 ++--- ...OpenIddictClientHandlers.Authentication.cs | 18 +- .../OpenIddictClientHandlers.Discovery.cs | 36 ++-- .../OpenIddictClientHandlers.Exchange.cs | 4 +- .../OpenIddictClientHandlers.Protection.cs | 24 +-- .../OpenIddictClientHandlers.Session.cs | 16 +- .../OpenIddictClientHandlers.Userinfo.cs | 6 +- .../OpenIddictClientHandlers.cs | 166 +++++++++--------- .../OpenIddictClientOptions.cs | 2 +- .../OpenIddictClientRegistration.cs | 2 +- .../OpenIddictClientRetriever.cs | 2 +- .../OpenIddictClientService.cs | 2 +- .../OpenIddictClientTransaction.cs | 2 +- .../Caches/OpenIddictApplicationCache.cs | 10 +- .../Caches/OpenIddictAuthorizationCache.cs | 10 +- .../Caches/OpenIddictScopeCache.cs | 9 +- .../Caches/OpenIddictTokenCache.cs | 9 +- src/OpenIddict.Core/OpenIddictCoreBuilder.cs | 2 +- src/OpenIddict.Core/OpenIddictCoreOptions.cs | 2 +- .../OpenIddictApplicationStoreResolver.cs | 2 +- .../OpenIddictAuthorizationStoreResolver.cs | 2 +- .../Resolvers/OpenIddictScopeStoreResolver.cs | 2 +- .../Resolvers/OpenIddictTokenStoreResolver.cs | 2 +- ...EntityFrameworkApplicationConfiguration.cs | 2 +- ...tityFrameworkAuthorizationConfiguration.cs | 2 +- ...IddictEntityFrameworkScopeConfiguration.cs | 2 +- ...IddictEntityFrameworkTokenConfiguration.cs | 2 +- .../OpenIddictEntityFrameworkBuilder.cs | 2 +- .../OpenIddictEntityFrameworkOptions.cs | 2 +- ...EntityFrameworkApplicationStoreResolver.cs | 4 +- ...tityFrameworkAuthorizationStoreResolver.cs | 4 +- ...IddictEntityFrameworkScopeStoreResolver.cs | 4 +- ...IddictEntityFrameworkTokenStoreResolver.cs | 4 +- ...tyFrameworkCoreApplicationConfiguration.cs | 2 +- ...FrameworkCoreAuthorizationConfiguration.cs | 2 +- ...ctEntityFrameworkCoreScopeConfiguration.cs | 2 +- ...ctEntityFrameworkCoreTokenConfiguration.cs | 2 +- .../OpenIddictEntityFrameworkCoreBuilder.cs | 2 +- ...OpenIddictEntityFrameworkCoreCustomizer.cs | 2 +- .../OpenIddictEntityFrameworkCoreOptions.cs | 2 +- ...tyFrameworkCoreApplicationStoreResolver.cs | 4 +- ...FrameworkCoreAuthorizationStoreResolver.cs | 4 +- ...ctEntityFrameworkCoreScopeStoreResolver.cs | 4 +- ...ctEntityFrameworkCoreTokenStoreResolver.cs | 4 +- .../OpenIddictMongoDbBuilder.cs | 2 +- .../OpenIddictMongoDbContext.cs | 2 +- .../OpenIddictMongoDbOptions.cs | 2 +- ...enIddictMongoDbApplicationStoreResolver.cs | 2 +- ...IddictMongoDbAuthorizationStoreResolver.cs | 2 +- .../OpenIddictMongoDbScopeStoreResolver.cs | 2 +- .../OpenIddictMongoDbTokenStoreResolver.cs | 2 +- .../OpenIddictQuartzBuilder.cs | 2 +- .../OpenIddictQuartzConfiguration.cs | 2 +- src/OpenIddict.Quartz/OpenIddictQuartzJob.cs | 2 +- .../OpenIddictQuartzOptions.cs | 2 +- .../OpenIddictServerAspNetCoreBuilder.cs | 2 +- ...OpenIddictServerAspNetCoreConfiguration.cs | 8 +- .../OpenIddictServerAspNetCoreFeature.cs | 2 +- .../OpenIddictServerAspNetCoreHandler.cs | 2 +- ...penIddictServerAspNetCoreHandlerFilters.cs | 22 +-- ...ServerAspNetCoreHandlers.Authentication.cs | 12 +- ...enIddictServerAspNetCoreHandlers.Device.cs | 2 +- ...nIddictServerAspNetCoreHandlers.Session.cs | 10 +- .../OpenIddictServerAspNetCoreHandlers.cs | 44 ++--- .../OpenIddictServerAspNetCoreOptions.cs | 2 +- .../OpenIddictServerDataProtectionBuilder.cs | 2 +- ...IddictServerDataProtectionConfiguration.cs | 4 +- ...OpenIddictServerDataProtectionFormatter.cs | 2 +- ...ddictServerDataProtectionHandlerFilters.cs | 2 +- ...ServerDataProtectionHandlers.Protection.cs | 6 +- .../OpenIddictServerDataProtectionOptions.cs | 2 +- .../OpenIddictServerOwinBuilder.cs | 2 +- .../OpenIddictServerOwinConfiguration.cs | 4 +- .../OpenIddictServerOwinHandler.cs | 2 +- .../OpenIddictServerOwinHandlerFilters.cs | 20 +-- ...IddictServerOwinHandlers.Authentication.cs | 12 +- .../OpenIddictServerOwinHandlers.Device.cs | 2 +- .../OpenIddictServerOwinHandlers.Session.cs | 10 +- .../OpenIddictServerOwinHandlers.cs | 46 ++--- .../OpenIddictServerOwinMiddleware.cs | 2 +- .../OpenIddictServerOwinMiddlewareFactory.cs | 2 +- .../OpenIddictServerOwinOptions.cs | 2 +- .../OpenIddictServerBuilder.cs | 3 +- .../OpenIddictServerConfiguration.cs | 2 +- .../OpenIddictServerDispatcher.cs | 2 +- .../OpenIddictServerEvents.Authentication.cs | 8 +- .../OpenIddictServerEvents.Device.cs | 16 +- .../OpenIddictServerEvents.Discovery.cs | 16 +- .../OpenIddictServerEvents.Exchange.cs | 8 +- .../OpenIddictServerEvents.Introspection.cs | 8 +- .../OpenIddictServerEvents.Protection.cs | 4 +- .../OpenIddictServerEvents.Revocation.cs | 8 +- .../OpenIddictServerEvents.Session.cs | 8 +- .../OpenIddictServerEvents.Userinfo.cs | 8 +- .../OpenIddictServerEvents.cs | 12 +- .../OpenIddictServerFactory.cs | 2 +- .../OpenIddictServerHandler.cs | 2 +- .../OpenIddictServerHandlerDescriptor.cs | 4 +- .../OpenIddictServerHandlerFilters.cs | 80 ++++----- ...OpenIddictServerHandlers.Authentication.cs | 60 +++---- .../OpenIddictServerHandlers.Device.cs | 36 ++-- .../OpenIddictServerHandlers.Discovery.cs | 40 ++--- .../OpenIddictServerHandlers.Exchange.cs | 54 +++--- .../OpenIddictServerHandlers.Introspection.cs | 34 ++-- .../OpenIddictServerHandlers.Protection.cs | 30 ++-- .../OpenIddictServerHandlers.Revocation.cs | 32 ++-- .../OpenIddictServerHandlers.Session.cs | 26 +-- .../OpenIddictServerHandlers.Userinfo.cs | 18 +- .../OpenIddictServerHandlers.cs | 92 +++++----- .../OpenIddictServerOptions.cs | 2 +- .../OpenIddictServerTransaction.cs | 2 +- .../OpenIddictValidationAspNetCoreBuilder.cs | 2 +- ...IddictValidationAspNetCoreConfiguration.cs | 6 +- .../OpenIddictValidationAspNetCoreFeature.cs | 2 +- .../OpenIddictValidationAspNetCoreHandler.cs | 2 +- ...ddictValidationAspNetCoreHandlerFilters.cs | 2 +- .../OpenIddictValidationAspNetCoreHandlers.cs | 20 +-- .../OpenIddictValidationAspNetCoreOptions.cs | 2 +- ...enIddictValidationDataProtectionBuilder.cs | 2 +- ...ctValidationDataProtectionConfiguration.cs | 4 +- ...IddictValidationDataProtectionFormatter.cs | 2 +- ...dationDataProtectionHandlers.Protection.cs | 2 +- ...enIddictValidationDataProtectionOptions.cs | 2 +- .../OpenIddictValidationOwinBuilder.cs | 2 +- .../OpenIddictValidationOwinConfiguration.cs | 2 +- .../OpenIddictValidationOwinHandler.cs | 2 +- .../OpenIddictValidationOwinHandlerFilters.cs | 2 +- .../OpenIddictValidationOwinHandlers.cs | 24 +-- .../OpenIddictValidationOwinMiddleware.cs | 2 +- ...enIddictValidationOwinMiddlewareFactory.cs | 2 +- .../OpenIddictValidationOwinOptions.cs | 2 +- ...ddictValidationServerIntegrationBuilder.cs | 2 +- ...alidationServerIntegrationConfiguration.cs | 4 +- ...ddictValidationServerIntegrationOptions.cs | 2 +- ...penIddictValidationSystemNetHttpBuilder.cs | 2 +- ...ictValidationSystemNetHttpConfiguration.cs | 4 +- ...ctValidationSystemNetHttpHandlerFilters.cs | 2 +- ...tionSystemNetHttpHandlers.Introspection.cs | 2 +- ...enIddictValidationSystemNetHttpHandlers.cs | 26 +-- ...penIddictValidationSystemNetHttpOptions.cs | 2 +- .../OpenIddictValidationBuilder.cs | 3 +- .../OpenIddictValidationConfiguration.cs | 2 +- .../OpenIddictValidationDispatcher.cs | 2 +- .../OpenIddictValidationEvents.Discovery.cs | 16 +- ...penIddictValidationEvents.Introspection.cs | 8 +- .../OpenIddictValidationEvents.Protection.cs | 2 +- .../OpenIddictValidationEvents.cs | 8 +- .../OpenIddictValidationFactory.cs | 2 +- .../OpenIddictValidationHandler.cs | 2 +- .../OpenIddictValidationHandlerDescriptor.cs | 4 +- .../OpenIddictValidationHandlerFilters.cs | 12 +- .../OpenIddictValidationHandlers.Discovery.cs | 18 +- ...nIddictValidationHandlers.Introspection.cs | 16 +- ...OpenIddictValidationHandlers.Protection.cs | 24 +-- .../OpenIddictValidationHandlers.cs | 16 +- .../OpenIddictValidationOptions.cs | 2 +- .../OpenIddictValidationRetriever.cs | 2 +- .../OpenIddictValidationService.cs | 2 +- .../OpenIddictValidationTransaction.cs | 2 +- 217 files changed, 957 insertions(+), 960 deletions(-) diff --git a/gen/OpenIddict.Client.WebIntegration.Generators/OpenIddictClientWebIntegrationGenerator.cs b/gen/OpenIddict.Client.WebIntegration.Generators/OpenIddictClientWebIntegrationGenerator.cs index 76becfef..b06148f6 100644 --- a/gen/OpenIddict.Client.WebIntegration.Generators/OpenIddictClientWebIntegrationGenerator.cs +++ b/gen/OpenIddict.Client.WebIntegration.Generators/OpenIddictClientWebIntegrationGenerator.cs @@ -8,7 +8,7 @@ using Scriban; namespace OpenIddict.Client.WebIntegration.Generators { [Generator] - public class OpenIddictClientWebIntegrationGenerator : ISourceGenerator + public sealed class OpenIddictClientWebIntegrationGenerator : ISourceGenerator { public void Execute(GeneratorExecutionContext context) { @@ -58,7 +58,7 @@ using static OpenIddict.Client.WebIntegration.OpenIddictClientWebIntegrationCons namespace Microsoft.Extensions.DependencyInjection; -public partial class OpenIddictClientWebIntegrationBuilder +public sealed partial class OpenIddictClientWebIntegrationBuilder { {{~ for provider in providers ~}} /// @@ -109,7 +109,7 @@ public partial class OpenIddictClientWebIntegrationBuilder /// /// Exposes the necessary methods required to configure the {{ provider.name }} integration. /// - public partial class {{ provider.name }} + public sealed partial class {{ provider.name }} { /// /// Initializes a new instance of . @@ -433,14 +433,14 @@ using static OpenIddict.Client.WebIntegration.OpenIddictClientWebIntegrationCons namespace OpenIddict.Client.WebIntegration; -public partial class OpenIddictClientWebIntegrationConfiguration +public sealed partial class OpenIddictClientWebIntegrationConfiguration { {{~ for provider in providers ~}} /// /// Contains the methods required to register the {{ provider.name }} integration in the OpenIddict client options. /// - public class {{ provider.name }} : IConfigureOptions, - IPostConfigureOptions + public sealed class {{ provider.name }} : IConfigureOptions, + IPostConfigureOptions { private readonly IServiceProvider _provider; @@ -783,7 +783,7 @@ using static OpenIddict.Client.WebIntegration.OpenIddictClientWebIntegrationCons namespace OpenIddict.Client.WebIntegration; -public partial class OpenIddictClientWebIntegrationHelpers +public static partial class OpenIddictClientWebIntegrationHelpers { {{~ for provider in providers ~}} /// @@ -815,13 +815,13 @@ using Microsoft.IdentityModel.Tokens; namespace OpenIddict.Client.WebIntegration; -public partial class OpenIddictClientWebIntegrationOptions +public sealed partial class OpenIddictClientWebIntegrationOptions { {{~ for provider in providers ~}} /// /// Provides various options needed to configure the {{ provider.name }} integration. /// - public class {{ provider.name }} + public sealed class {{ provider.name }} { /// /// Gets or sets the client identifier. diff --git a/src/OpenIddict.Abstractions/OpenIddictBuilder.cs b/src/OpenIddict.Abstractions/OpenIddictBuilder.cs index 2cb4ec12..09df8777 100644 --- a/src/OpenIddict.Abstractions/OpenIddictBuilder.cs +++ b/src/OpenIddict.Abstractions/OpenIddictBuilder.cs @@ -11,7 +11,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// /// Provides a shared entry point allowing to configure the OpenIddict services. /// -public class OpenIddictBuilder +public sealed class OpenIddictBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Abstractions/OpenIddictExceptions.cs b/src/OpenIddict.Abstractions/OpenIddictExceptions.cs index 82731b5f..7b0410e2 100644 --- a/src/OpenIddict.Abstractions/OpenIddictExceptions.cs +++ b/src/OpenIddict.Abstractions/OpenIddictExceptions.cs @@ -11,7 +11,7 @@ public static class OpenIddictExceptions /// /// Represents an OpenIddict concurrency exception. /// - public class ConcurrencyException : Exception + public sealed class ConcurrencyException : Exception { /// /// Creates a new . @@ -36,7 +36,7 @@ public static class OpenIddictExceptions /// /// Represents an OpenIddict protocol exception. /// - public class ProtocolException : Exception + public sealed class ProtocolException : Exception { /// /// Creates a new . @@ -102,7 +102,7 @@ public static class OpenIddictExceptions /// /// Represents an OpenIddict validation exception. /// - public class ValidationException : Exception + public sealed class ValidationException : Exception { /// /// Creates a new . diff --git a/src/OpenIddict.Abstractions/Primitives/OpenIddictConfiguration.cs b/src/OpenIddict.Abstractions/Primitives/OpenIddictConfiguration.cs index 2f2a446c..27213d07 100644 --- a/src/OpenIddict.Abstractions/Primitives/OpenIddictConfiguration.cs +++ b/src/OpenIddict.Abstractions/Primitives/OpenIddictConfiguration.cs @@ -14,7 +14,7 @@ namespace OpenIddict.Abstractions; /// /// Note: depending on the stack used to produce this instance, only a few select properties may be available. /// -public class OpenIddictConfiguration +public sealed class OpenIddictConfiguration { /// /// Gets or sets the address of the authorization endpoint. @@ -66,6 +66,11 @@ public class OpenIddictConfiguration /// public Uri? JwksUri { get; set; } + /// + /// Gets the additional properties. + /// + public Dictionary Properties { get; } = new(StringComparer.Ordinal); + /// /// Gets the response mode supported by the server. /// diff --git a/src/OpenIddict.Abstractions/Primitives/OpenIddictConverter.cs b/src/OpenIddict.Abstractions/Primitives/OpenIddictConverter.cs index 8c262337..10326d2b 100644 --- a/src/OpenIddict.Abstractions/Primitives/OpenIddictConverter.cs +++ b/src/OpenIddict.Abstractions/Primitives/OpenIddictConverter.cs @@ -12,7 +12,7 @@ namespace OpenIddict.Abstractions; /// /// Represents a JSON converter able to convert OpenIddict primitives. /// -public class OpenIddictConverter : JsonConverter +public sealed class OpenIddictConverter : JsonConverter { /// /// Determines whether the specified type is supported by this converter. diff --git a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreBuilder.cs b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreBuilder.cs index 565cb36a..27647d5a 100644 --- a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreBuilder.cs +++ b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreBuilder.cs @@ -14,7 +14,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// Exposes the necessary methods required to configure /// the OpenIddict client ASP.NET Core integration. /// -public class OpenIddictClientAspNetCoreBuilder +public sealed class OpenIddictClientAspNetCoreBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreConfiguration.cs b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreConfiguration.cs index 150dd22c..ecaec5f0 100644 --- a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreConfiguration.cs +++ b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreConfiguration.cs @@ -11,9 +11,9 @@ namespace OpenIddict.Client.AspNetCore; /// /// Contains the methods required to ensure that the OpenIddict client configuration is valid. /// -public class OpenIddictClientAspNetCoreConfiguration : IConfigureOptions, - IConfigureOptions, - IPostConfigureOptions +public sealed class OpenIddictClientAspNetCoreConfiguration : IConfigureOptions, + IConfigureOptions, + IPostConfigureOptions { /// /// Registers the OpenIddict client handler in the global authentication options. diff --git a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreFeature.cs b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreFeature.cs index 28875f65..d43b465b 100644 --- a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreFeature.cs +++ b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreFeature.cs @@ -9,7 +9,7 @@ namespace OpenIddict.Client.AspNetCore; /// /// Exposes the current client transaction to the ASP.NET Core host. /// -public class OpenIddictClientAspNetCoreFeature +public sealed class OpenIddictClientAspNetCoreFeature { /// /// Gets or sets the client transaction that encapsulates all specific diff --git a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandler.cs b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandler.cs index 0a243351..35d0f5b6 100644 --- a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandler.cs +++ b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandler.cs @@ -18,7 +18,7 @@ namespace OpenIddict.Client.AspNetCore; /// /// Provides the logic necessary to extract, validate and handle OpenID Connect requests. /// -public class OpenIddictClientAspNetCoreHandler : AuthenticationHandler, +public sealed class OpenIddictClientAspNetCoreHandler : AuthenticationHandler, IAuthenticationRequestHandler, IAuthenticationSignOutHandler { diff --git a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlerFilters.cs b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlerFilters.cs index 6e374d25..cbc95cab 100644 --- a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlerFilters.cs +++ b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlerFilters.cs @@ -19,7 +19,7 @@ public static class OpenIddictClientAspNetCoreHandlerFilters /// /// Represents a filter that excludes the associated handlers if error pass-through was not enabled. /// - public class RequireErrorPassthroughEnabled : IOpenIddictClientHandlerFilter + public sealed class RequireErrorPassthroughEnabled : IOpenIddictClientHandlerFilter { private readonly IOptionsMonitor _options; @@ -40,7 +40,7 @@ public static class OpenIddictClientAspNetCoreHandlerFilters /// /// Represents a filter that excludes the associated handlers if no ASP.NET Core request can be found. /// - public class RequireHttpRequest : IOpenIddictClientHandlerFilter + public sealed class RequireHttpRequest : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -57,7 +57,7 @@ public static class OpenIddictClientAspNetCoreHandlerFilters /// Represents a filter that excludes the associated handlers if the /// pass-through mode was not enabled for the post-logout redirection endpoint. /// - public class RequirePostLogoutRedirectionEndpointPassthroughEnabled : IOpenIddictClientHandlerFilter + public sealed class RequirePostLogoutRedirectionEndpointPassthroughEnabled : IOpenIddictClientHandlerFilter { private readonly IOptionsMonitor _options; @@ -79,7 +79,7 @@ public static class OpenIddictClientAspNetCoreHandlerFilters /// Represents a filter that excludes the associated handlers if the /// pass-through mode was not enabled for the redirection endpoint. /// - public class RequireRedirectionEndpointPassthroughEnabled : IOpenIddictClientHandlerFilter + public sealed class RequireRedirectionEndpointPassthroughEnabled : IOpenIddictClientHandlerFilter { private readonly IOptionsMonitor _options; @@ -100,7 +100,7 @@ public static class OpenIddictClientAspNetCoreHandlerFilters /// /// Represents a filter that excludes the associated handlers if status code pages support was not enabled. /// - public class RequireStatusCodePagesIntegrationEnabled : IOpenIddictClientHandlerFilter + public sealed class RequireStatusCodePagesIntegrationEnabled : IOpenIddictClientHandlerFilter { private readonly IOptionsMonitor _options; diff --git a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlers.Authentication.cs b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlers.Authentication.cs index 19486616..350cd77e 100644 --- a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlers.Authentication.cs +++ b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlers.Authentication.cs @@ -43,7 +43,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// Contains the logic responsible for processing authorization requests using 302 redirects. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessQueryRequest : IOpenIddictClientHandler + public sealed class ProcessQueryRequest : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlers.Session.cs b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlers.Session.cs index d8f7dc1e..fad91386 100644 --- a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlers.Session.cs +++ b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlers.Session.cs @@ -43,7 +43,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// Contains the logic responsible for processing authorization requests using 302 redirects. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessQueryRequest : IOpenIddictClientHandler + public sealed class ProcessQueryRequest : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlers.cs b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlers.cs index e412ac54..ef51615e 100644 --- a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlers.cs +++ b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandlers.cs @@ -59,7 +59,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// Contains the logic responsible for inferring the endpoint type from the request address. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class InferEndpointType : IOpenIddictClientHandler + public sealed class InferEndpointType : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -148,7 +148,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// Contains the logic responsible for extracting OpenID Connect requests from GET or POST HTTP requests. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ExtractGetOrPostRequest : IOpenIddictClientHandler where TContext : BaseValidatingContext + public sealed class ExtractGetOrPostRequest : IOpenIddictClientHandler where TContext : BaseValidatingContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -228,7 +228,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// Contains the logic responsible for resolving the request forgery protection from the correlation cookie. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ResolveRequestForgeryProtection : IOpenIddictClientHandler + public sealed class ResolveRequestForgeryProtection : IOpenIddictClientHandler { private readonly IOptionsMonitor _options; @@ -351,7 +351,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// Contains the logic responsible for comparing the current request URL to the expected URL stored in the state token. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ValidateEndpointUri : IOpenIddictClientHandler + public sealed class ValidateEndpointUri : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -456,7 +456,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// ASP.NET Core authentication properties specified by the application that triggered the challenge operation. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ResolveHostChallengeProperties : IOpenIddictClientHandler + public sealed class ResolveHostChallengeProperties : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -556,7 +556,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// protection against state token injection, forged requests and session fixation attacks. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class GenerateLoginCorrelationCookie : IOpenIddictClientHandler + public sealed class GenerateLoginCorrelationCookie : IOpenIddictClientHandler { private readonly IOptionsMonitor _options; @@ -649,7 +649,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// ASP.NET Core authentication properties specified by the application that triggered the sign-out operation. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ResolveHostSignOutProperties : IOpenIddictClientHandler + public sealed class ResolveHostSignOutProperties : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -749,7 +749,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// protection against state token injection, forged requests and denial of service attacks. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class GenerateLogoutCorrelationCookie : IOpenIddictClientHandler + public sealed class GenerateLogoutCorrelationCookie : IOpenIddictClientHandler { private readonly IOptionsMonitor _options; @@ -840,7 +840,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// Contains the logic responsible for enabling the pass-through mode for the received request. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class EnablePassthroughMode : IOpenIddictClientHandler + public sealed class EnablePassthroughMode : IOpenIddictClientHandler where TContext : BaseRequestContext where TFilter : IOpenIddictClientHandlerFilter { @@ -874,7 +874,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// Contains the logic responsible for attaching an appropriate HTTP status code. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class AttachHttpResponseCode : IOpenIddictClientHandler where TContext : BaseRequestContext + public sealed class AttachHttpResponseCode : IOpenIddictClientHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -917,7 +917,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// Contains the logic responsible for attaching the appropriate HTTP response cache headers. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class AttachCacheControlHeader : IOpenIddictClientHandler where TContext : BaseRequestContext + public sealed class AttachCacheControlHeader : IOpenIddictClientHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -957,7 +957,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// middleware in the pipeline at a later stage (e.g an ASP.NET Core MVC action or a NancyFX module). /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessPassthroughErrorResponse : IOpenIddictClientHandler + public sealed class ProcessPassthroughErrorResponse : IOpenIddictClientHandler where TContext : BaseRequestContext where TFilter : IOpenIddictClientHandlerFilter { @@ -999,7 +999,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// Contains the logic responsible for processing OpenID Connect responses handled by the status code pages middleware. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessStatusCodePagesErrorResponse : IOpenIddictClientHandler + public sealed class ProcessStatusCodePagesErrorResponse : IOpenIddictClientHandler where TContext : BaseRequestContext { /// @@ -1056,7 +1056,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// Contains the logic responsible for processing context responses that must be returned as plain-text. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessLocalErrorResponse : IOpenIddictClientHandler + public sealed class ProcessLocalErrorResponse : IOpenIddictClientHandler where TContext : BaseRequestContext { /// @@ -1130,7 +1130,7 @@ public static partial class OpenIddictClientAspNetCoreHandlers /// Contains the logic responsible for processing OpenID Connect responses that don't specify any parameter. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessEmptyResponse : IOpenIddictClientHandler + public sealed class ProcessEmptyResponse : IOpenIddictClientHandler where TContext : BaseRequestContext { /// diff --git a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreOptions.cs b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreOptions.cs index d84fcb13..1abd5033 100644 --- a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreOptions.cs +++ b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreOptions.cs @@ -11,7 +11,7 @@ namespace OpenIddict.Client.AspNetCore; /// /// Provides various settings needed to configure the OpenIddict ASP.NET Core client integration. /// -public class OpenIddictClientAspNetCoreOptions : AuthenticationSchemeOptions +public sealed class OpenIddictClientAspNetCoreOptions : AuthenticationSchemeOptions { /// /// Gets or sets a boolean indicating whether the pass-through mode is enabled for the post-logout redirection endpoint. diff --git a/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionBuilder.cs b/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionBuilder.cs index 4e780449..f4002367 100644 --- a/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionBuilder.cs +++ b/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionBuilder.cs @@ -14,7 +14,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// Exposes the necessary methods required to configure the /// OpenIddict ASP.NET Core Data Protection integration. /// -public class OpenIddictClientDataProtectionBuilder +public sealed class OpenIddictClientDataProtectionBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionConfiguration.cs b/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionConfiguration.cs index 75b4b2ac..f94f084b 100644 --- a/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionConfiguration.cs +++ b/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionConfiguration.cs @@ -12,8 +12,8 @@ namespace OpenIddict.Client.DataProtection; /// /// Contains the methods required to ensure that the OpenIddict ASP.NET Core Data Protection configuration is valid. /// -public class OpenIddictClientDataProtectionConfiguration : IConfigureOptions, - IPostConfigureOptions +public sealed class OpenIddictClientDataProtectionConfiguration : IConfigureOptions, + IPostConfigureOptions { private readonly IDataProtectionProvider _dataProtectionProvider; diff --git a/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionFormatter.cs b/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionFormatter.cs index ee20518e..82bdeba7 100644 --- a/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionFormatter.cs +++ b/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionFormatter.cs @@ -13,7 +13,7 @@ using Properties = OpenIddict.Client.DataProtection.OpenIddictClientDataProtecti namespace OpenIddict.Client.DataProtection; -public class OpenIddictClientDataProtectionFormatter : IOpenIddictClientDataProtectionFormatter +public sealed class OpenIddictClientDataProtectionFormatter : IOpenIddictClientDataProtectionFormatter { public ClaimsPrincipal ReadToken(BinaryReader reader) { diff --git a/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionHandlerFilters.cs b/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionHandlerFilters.cs index 0fe81630..63b4331b 100644 --- a/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionHandlerFilters.cs +++ b/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionHandlerFilters.cs @@ -15,7 +15,7 @@ public static class OpenIddictClientDataProtectionHandlerFilters /// Represents a filter that excludes the associated handlers if /// the selected token format is not ASP.NET Core Data Protection. /// - public class RequireDataProtectionTokenFormat : IOpenIddictClientHandlerFilter + public sealed class RequireDataProtectionTokenFormat : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(GenerateTokenContext context) { diff --git a/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionHandlers.Protection.cs b/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionHandlers.Protection.cs index f15018ed..629661a6 100644 --- a/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionHandlers.Protection.cs +++ b/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionHandlers.Protection.cs @@ -35,7 +35,7 @@ public static partial class OpenIddictClientDataProtectionHandlers /// /// Contains the logic responsible for validating tokens generated using Data Protection. /// - public class ValidateDataProtectionToken : IOpenIddictClientHandler + public sealed class ValidateDataProtectionToken : IOpenIddictClientHandler { private readonly IOptionsMonitor _options; @@ -138,7 +138,7 @@ public static partial class OpenIddictClientDataProtectionHandlers /// Contains the logic responsible for overriding the default token format /// to generate ASP.NET Core Data Protection tokens instead of JSON Web Tokens. /// - public class OverrideGeneratedTokenFormat : IOpenIddictClientHandler + public sealed class OverrideGeneratedTokenFormat : IOpenIddictClientHandler { private readonly IOptionsMonitor _options; @@ -184,7 +184,7 @@ public static partial class OpenIddictClientDataProtectionHandlers /// /// Contains the logic responsible for generating a token using Data Protection. /// - public class GenerateDataProtectionToken : IOpenIddictClientHandler + public sealed class GenerateDataProtectionToken : IOpenIddictClientHandler { private readonly IOptionsMonitor _options; diff --git a/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionOptions.cs b/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionOptions.cs index be1f9e9c..028b2d99 100644 --- a/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionOptions.cs +++ b/src/OpenIddict.Client.DataProtection/OpenIddictClientDataProtectionOptions.cs @@ -12,7 +12,7 @@ namespace OpenIddict.Client.DataProtection; /// Provides various settings needed to configure the OpenIddict /// ASP.NET Core Data Protection server integration. /// -public class OpenIddictClientDataProtectionOptions +public sealed class OpenIddictClientDataProtectionOptions { /// /// Gets or sets the data protection provider used to create the default diff --git a/src/OpenIddict.Client.Owin/OpenIddictClientOwinBuilder.cs b/src/OpenIddict.Client.Owin/OpenIddictClientOwinBuilder.cs index ba965f68..a865a059 100644 --- a/src/OpenIddict.Client.Owin/OpenIddictClientOwinBuilder.cs +++ b/src/OpenIddict.Client.Owin/OpenIddictClientOwinBuilder.cs @@ -14,7 +14,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// Exposes the necessary methods required to configure /// the OpenIddict client OWIN/Katana integration. /// -public class OpenIddictClientOwinBuilder +public sealed class OpenIddictClientOwinBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Client.Owin/OpenIddictClientOwinConfiguration.cs b/src/OpenIddict.Client.Owin/OpenIddictClientOwinConfiguration.cs index 33a157e9..f6ab294a 100644 --- a/src/OpenIddict.Client.Owin/OpenIddictClientOwinConfiguration.cs +++ b/src/OpenIddict.Client.Owin/OpenIddictClientOwinConfiguration.cs @@ -11,8 +11,8 @@ namespace OpenIddict.Client.Owin; /// /// Contains the methods required to ensure that the OpenIddict client configuration is valid. /// -public class OpenIddictClientOwinConfiguration : IConfigureOptions, - IPostConfigureOptions +public sealed class OpenIddictClientOwinConfiguration : IConfigureOptions, + IPostConfigureOptions { public void Configure(OpenIddictClientOptions options) { diff --git a/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandler.cs b/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandler.cs index 63bb2c15..bdf42ca3 100644 --- a/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandler.cs +++ b/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandler.cs @@ -16,7 +16,7 @@ namespace OpenIddict.Client.Owin; /// /// Provides the entry point necessary to register the OpenIddict client in an OWIN pipeline. /// -public class OpenIddictClientOwinHandler : AuthenticationHandler +public sealed class OpenIddictClientOwinHandler : AuthenticationHandler { private readonly IOpenIddictClientDispatcher _dispatcher; private readonly IOpenIddictClientFactory _factory; diff --git a/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlerFilters.cs b/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlerFilters.cs index 151c5792..8c461f45 100644 --- a/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlerFilters.cs +++ b/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlerFilters.cs @@ -20,7 +20,7 @@ public static class OpenIddictClientOwinHandlerFilters /// Represents a filter that excludes the associated handlers if the /// pass-through mode was not enabled for the post-logout redirection endpoint. /// - public class RequirePostLogoutRedirectionEndpointPassthroughEnabled : IOpenIddictClientHandlerFilter + public sealed class RequirePostLogoutRedirectionEndpointPassthroughEnabled : IOpenIddictClientHandlerFilter { private readonly IOptionsMonitor _options; @@ -42,7 +42,7 @@ public static class OpenIddictClientOwinHandlerFilters /// Represents a filter that excludes the associated handlers if the /// pass-through mode was not enabled for the redirection endpoint. /// - public class RequireRedirectionEndpointPassthroughEnabled : IOpenIddictClientHandlerFilter + public sealed class RequireRedirectionEndpointPassthroughEnabled : IOpenIddictClientHandlerFilter { private readonly IOptionsMonitor _options; @@ -63,7 +63,7 @@ public static class OpenIddictClientOwinHandlerFilters /// /// Represents a filter that excludes the associated handlers if error pass-through was not enabled. /// - public class RequireErrorPassthroughEnabled : IOpenIddictClientHandlerFilter + public sealed class RequireErrorPassthroughEnabled : IOpenIddictClientHandlerFilter { private readonly IOptionsMonitor _options; @@ -84,7 +84,7 @@ public static class OpenIddictClientOwinHandlerFilters /// /// Represents a filter that excludes the associated handlers if no OWIN request can be found. /// - public class RequireOwinRequest : IOpenIddictClientHandlerFilter + public sealed class RequireOwinRequest : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { diff --git a/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlers.Authentication.cs b/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlers.Authentication.cs index 8041557a..a4549e0c 100644 --- a/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlers.Authentication.cs +++ b/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlers.Authentication.cs @@ -43,7 +43,7 @@ public static partial class OpenIddictClientOwinHandlers /// Contains the logic responsible for processing authorization requests using 302 redirects. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessQueryRequest : IOpenIddictClientHandler + public sealed class ProcessQueryRequest : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlers.Session.cs b/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlers.Session.cs index f34c60a7..f9bbc900 100644 --- a/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlers.Session.cs +++ b/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlers.Session.cs @@ -41,7 +41,7 @@ public static partial class OpenIddictClientOwinHandlers /// Contains the logic responsible for processing authorization requests using 302 redirects. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessQueryRequest : IOpenIddictClientHandler + public sealed class ProcessQueryRequest : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlers.cs b/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlers.cs index f5d8e5cc..ae8aab0e 100644 --- a/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlers.cs +++ b/src/OpenIddict.Client.Owin/OpenIddictClientOwinHandlers.cs @@ -55,7 +55,7 @@ public static partial class OpenIddictClientOwinHandlers /// Contains the logic responsible for inferring the endpoint type from the request address. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class InferEndpointType : IOpenIddictClientHandler + public sealed class InferEndpointType : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -147,7 +147,7 @@ public static partial class OpenIddictClientOwinHandlers /// Contains the logic responsible for extracting OpenID Connect requests from GET or POST HTTP requests. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ExtractGetOrPostRequest : IOpenIddictClientHandler where TContext : BaseValidatingContext + public sealed class ExtractGetOrPostRequest : IOpenIddictClientHandler where TContext : BaseValidatingContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -227,7 +227,7 @@ public static partial class OpenIddictClientOwinHandlers /// Contains the logic responsible for resolving the request forgery protection from the correlation cookie. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ResolveRequestForgeryProtection : IOpenIddictClientHandler + public sealed class ResolveRequestForgeryProtection : IOpenIddictClientHandler { private readonly IOptionsMonitor _options; @@ -359,7 +359,7 @@ public static partial class OpenIddictClientOwinHandlers /// Contains the logic responsible for comparing the current request URL to the expected URL stored in the state token. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ValidateEndpointUri : IOpenIddictClientHandler + public sealed class ValidateEndpointUri : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -467,7 +467,7 @@ public static partial class OpenIddictClientOwinHandlers /// OWIN authentication properties specified by the application that triggered the challenge operation. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ResolveHostChallengeProperties : IOpenIddictClientHandler + public sealed class ResolveHostChallengeProperties : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -585,7 +585,7 @@ public static partial class OpenIddictClientOwinHandlers /// protection against state token injection, forged requests and session fixation attacks. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class GenerateLoginCorrelationCookie : IOpenIddictClientHandler + public sealed class GenerateLoginCorrelationCookie : IOpenIddictClientHandler { private readonly IOptionsMonitor _options; @@ -686,7 +686,7 @@ public static partial class OpenIddictClientOwinHandlers /// OWIN authentication properties specified by the application that triggered the sign-out operation. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ResolveHostSignOutProperties : IOpenIddictClientHandler + public sealed class ResolveHostSignOutProperties : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -804,7 +804,7 @@ public static partial class OpenIddictClientOwinHandlers /// protection against state token injection, forged requests and denial of service attacks. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class GenerateLogoutCorrelationCookie : IOpenIddictClientHandler + public sealed class GenerateLogoutCorrelationCookie : IOpenIddictClientHandler { private readonly IOptionsMonitor _options; @@ -903,7 +903,7 @@ public static partial class OpenIddictClientOwinHandlers /// Contains the logic responsible for enabling the pass-through mode for the received request. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class EnablePassthroughMode : IOpenIddictClientHandler + public sealed class EnablePassthroughMode : IOpenIddictClientHandler where TContext : BaseRequestContext where TFilter : IOpenIddictClientHandlerFilter { @@ -937,7 +937,7 @@ public static partial class OpenIddictClientOwinHandlers /// Contains the logic responsible for attaching an appropriate HTTP status code. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class AttachHttpResponseCode : IOpenIddictClientHandler where TContext : BaseRequestContext + public sealed class AttachHttpResponseCode : IOpenIddictClientHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -980,7 +980,7 @@ public static partial class OpenIddictClientOwinHandlers /// Contains the logic responsible for attaching an OWIN response chalenge to the context, if necessary. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class AttachOwinResponseChallenge : IOpenIddictClientHandler where TContext : BaseRequestContext + public sealed class AttachOwinResponseChallenge : IOpenIddictClientHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -1032,7 +1032,7 @@ public static partial class OpenIddictClientOwinHandlers /// Contains the logic responsible for suppressing the redirection applied by FormsAuthenticationModule, if necessary. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class SuppressFormsAuthenticationRedirect : IOpenIddictClientHandler where TContext : BaseRequestContext + public sealed class SuppressFormsAuthenticationRedirect : IOpenIddictClientHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -1099,7 +1099,7 @@ public static partial class OpenIddictClientOwinHandlers /// Contains the logic responsible for attaching the appropriate HTTP response cache headers. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class AttachCacheControlHeader : IOpenIddictClientHandler where TContext : BaseRequestContext + public sealed class AttachCacheControlHeader : IOpenIddictClientHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -1139,7 +1139,7 @@ public static partial class OpenIddictClientOwinHandlers /// middleware in the pipeline at a later stage (e.g an ASP.NET MVC action or a NancyFX module). /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessPassthroughErrorResponse : IOpenIddictClientHandler + public sealed class ProcessPassthroughErrorResponse : IOpenIddictClientHandler where TContext : BaseRequestContext where TFilter : IOpenIddictClientHandlerFilter { @@ -1181,7 +1181,7 @@ public static partial class OpenIddictClientOwinHandlers /// Contains the logic responsible for processing context responses that must be returned as plain-text. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessLocalErrorResponse : IOpenIddictClientHandler + public sealed class ProcessLocalErrorResponse : IOpenIddictClientHandler where TContext : BaseRequestContext { /// @@ -1255,7 +1255,7 @@ public static partial class OpenIddictClientOwinHandlers /// Contains the logic responsible for processing OpenID Connect responses that don't specify any parameter. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessEmptyResponse : IOpenIddictClientHandler + public sealed class ProcessEmptyResponse : IOpenIddictClientHandler where TContext : BaseRequestContext { /// diff --git a/src/OpenIddict.Client.Owin/OpenIddictClientOwinMiddleware.cs b/src/OpenIddict.Client.Owin/OpenIddictClientOwinMiddleware.cs index b7fa3690..c45e740d 100644 --- a/src/OpenIddict.Client.Owin/OpenIddictClientOwinMiddleware.cs +++ b/src/OpenIddict.Client.Owin/OpenIddictClientOwinMiddleware.cs @@ -15,7 +15,7 @@ namespace OpenIddict.Client.Owin; /// that support middleware resolution, like Autofac. Since it depends on scoped services, /// it is NOT recommended to instantiate it as a singleton like a regular OWIN middleware. /// -public class OpenIddictClientOwinMiddleware : AuthenticationMiddleware +public sealed class OpenIddictClientOwinMiddleware : AuthenticationMiddleware { private readonly IOpenIddictClientDispatcher _dispatcher; private readonly IOpenIddictClientFactory _factory; diff --git a/src/OpenIddict.Client.Owin/OpenIddictClientOwinMiddlewareFactory.cs b/src/OpenIddict.Client.Owin/OpenIddictClientOwinMiddlewareFactory.cs index 27a10e25..34d01cad 100644 --- a/src/OpenIddict.Client.Owin/OpenIddictClientOwinMiddlewareFactory.cs +++ b/src/OpenIddict.Client.Owin/OpenIddictClientOwinMiddlewareFactory.cs @@ -13,7 +13,7 @@ namespace OpenIddict.Client.Owin; /// Provides the entry point necessary to instantiate and register the scoped /// in an OWIN/Katana pipeline. /// -public class OpenIddictClientOwinMiddlewareFactory : OwinMiddleware +public sealed class OpenIddictClientOwinMiddlewareFactory : OwinMiddleware { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Client.Owin/OpenIddictClientOwinOptions.cs b/src/OpenIddict.Client.Owin/OpenIddictClientOwinOptions.cs index 902f9eb5..e18380f5 100644 --- a/src/OpenIddict.Client.Owin/OpenIddictClientOwinOptions.cs +++ b/src/OpenIddict.Client.Owin/OpenIddictClientOwinOptions.cs @@ -11,7 +11,7 @@ namespace OpenIddict.Client.Owin; /// /// Provides various settings needed to configure the OpenIddict OWIN client integration. /// -public class OpenIddictClientOwinOptions : AuthenticationOptions +public sealed class OpenIddictClientOwinOptions : AuthenticationOptions { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpBuilder.cs b/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpBuilder.cs index 16e3afe4..3624017c 100644 --- a/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpBuilder.cs +++ b/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpBuilder.cs @@ -15,7 +15,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// /// Exposes the necessary methods required to configure the OpenIddict client/System.Net.Http integration. /// -public class OpenIddictClientSystemNetHttpBuilder +public sealed class OpenIddictClientSystemNetHttpBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpConfiguration.cs b/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpConfiguration.cs index 6a708f5f..ae987918 100644 --- a/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpConfiguration.cs +++ b/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpConfiguration.cs @@ -13,8 +13,8 @@ namespace OpenIddict.Client.SystemNetHttp; /// /// Contains the methods required to ensure that the OpenIddict client/System.Net.Http integration configuration is valid. /// -public class OpenIddictClientSystemNetHttpConfiguration : IConfigureOptions, - IConfigureNamedOptions +public sealed class OpenIddictClientSystemNetHttpConfiguration : IConfigureOptions, + IConfigureNamedOptions { #if !SUPPORTS_SERVICE_PROVIDER_IN_HTTP_MESSAGE_HANDLER_BUILDER private readonly IServiceProvider _provider; diff --git a/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlerFilters.cs b/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlerFilters.cs index 3e4e9a23..08a9c826 100644 --- a/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlerFilters.cs +++ b/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlerFilters.cs @@ -14,7 +14,7 @@ public static class OpenIddictClientSystemNetHttpHandlerFilters /// /// Represents a filter that excludes the associated handlers if the metadata address of the issuer is not available. /// - public class RequireHttpMetadataAddress : IOpenIddictClientHandlerFilter + public sealed class RequireHttpMetadataAddress : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(BaseExternalContext context) { diff --git a/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlers.Exchange.cs b/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlers.Exchange.cs index b973fb7b..178e3e30 100644 --- a/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlers.Exchange.cs +++ b/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlers.Exchange.cs @@ -39,7 +39,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// /// Contains the logic responsible for attaching the client credentials to the HTTP Authorization header. /// - public class AttachBasicAuthenticationCredentials : IOpenIddictClientHandler + public sealed class AttachBasicAuthenticationCredentials : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlers.Userinfo.cs b/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlers.Userinfo.cs index f322e053..199bd82a 100644 --- a/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlers.Userinfo.cs +++ b/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlers.Userinfo.cs @@ -40,7 +40,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// /// Contains the logic responsible for attaching the access token to the HTTP Authorization header. /// - public class AttachBearerAccessToken : IOpenIddictClientHandler + public sealed class AttachBearerAccessToken : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -81,7 +81,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// /// Contains the logic responsible for extracting the response from the userinfo response. /// - public class ExtractUserinfoTokenHttpResponse : IOpenIddictClientHandler + public sealed class ExtractUserinfoTokenHttpResponse : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlers.cs b/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlers.cs index 2cd7631d..834133fb 100644 --- a/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlers.cs +++ b/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHandlers.cs @@ -30,7 +30,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// /// Contains the logic responsible for preparing an HTTP GET request message. /// - public class PrepareGetHttpRequest : IOpenIddictClientHandler where TContext : BaseExternalContext + public sealed class PrepareGetHttpRequest : IOpenIddictClientHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -62,7 +62,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// /// Contains the logic responsible for preparing an HTTP POST request message. /// - public class PreparePostHttpRequest : IOpenIddictClientHandler where TContext : BaseExternalContext + public sealed class PreparePostHttpRequest : IOpenIddictClientHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -95,7 +95,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// Contains the logic responsible for attaching the appropriate HTTP /// Accept-* headers to the HTTP request message to receive JSON responses. /// - public class AttachJsonAcceptHeaders : IOpenIddictClientHandler where TContext : BaseExternalContext + public sealed class AttachJsonAcceptHeaders : IOpenIddictClientHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -135,7 +135,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// /// Contains the logic responsible for attaching the user agent to the HTTP request. /// - public class AttachUserAgentHeader : IOpenIddictClientHandler where TContext : BaseExternalContext + public sealed class AttachUserAgentHeader : IOpenIddictClientHandler where TContext : BaseExternalContext { private readonly IOptionsMonitor _options; @@ -189,7 +189,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// /// Contains the logic responsible for attaching the query string parameters to the HTTP request. /// - public class AttachQueryStringParameters : IOpenIddictClientHandler where TContext : BaseExternalContext + public sealed class AttachQueryStringParameters : IOpenIddictClientHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -234,7 +234,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// /// Contains the logic responsible for attaching the form parameters to the HTTP request. /// - public class AttachFormParameters : IOpenIddictClientHandler where TContext : BaseExternalContext + public sealed class AttachFormParameters : IOpenIddictClientHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -276,7 +276,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// /// Contains the logic responsible for sending the HTTP request to the remote server. /// - public class SendHttpRequest : IOpenIddictClientHandler where TContext : BaseExternalContext + public sealed class SendHttpRequest : IOpenIddictClientHandler where TContext : BaseExternalContext { private readonly IHttpClientFactory _factory; @@ -354,7 +354,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// /// Contains the logic responsible for disposing of the HTTP request message. /// - public class DisposeHttpRequest : IOpenIddictClientHandler where TContext : BaseExternalContext + public sealed class DisposeHttpRequest : IOpenIddictClientHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -392,7 +392,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// /// Contains the logic responsible for decompressing the returned HTTP content. /// - public class DecompressResponseContent : IOpenIddictClientHandler where TContext : BaseExternalContext + public sealed class DecompressResponseContent : IOpenIddictClientHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -531,7 +531,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// /// Contains the logic responsible for extracting the response from the JSON-encoded HTTP body. /// - public class ExtractJsonHttpResponse : IOpenIddictClientHandler where TContext : BaseExternalContext + public sealed class ExtractJsonHttpResponse : IOpenIddictClientHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -599,7 +599,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// /// Contains the logic responsible for extracting errors from WWW-Authenticate headers. /// - public class ExtractWwwAuthenticateHeader : IOpenIddictClientHandler where TContext : BaseExternalContext + public sealed class ExtractWwwAuthenticateHeader : IOpenIddictClientHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -682,7 +682,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// /// Contains the logic responsible for extracting errors from WWW-Authenticate headers. /// - public class ValidateHttpResponse : IOpenIddictClientHandler where TContext : BaseExternalContext + public sealed class ValidateHttpResponse : IOpenIddictClientHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -752,7 +752,7 @@ public static partial class OpenIddictClientSystemNetHttpHandlers /// /// Contains the logic responsible for disposing of the HTTP response message. /// - public class DisposeHttpResponse : IOpenIddictClientHandler where TContext : BaseExternalContext + public sealed class DisposeHttpResponse : IOpenIddictClientHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpOptions.cs b/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpOptions.cs index 10338513..2a77ee30 100644 --- a/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpOptions.cs +++ b/src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpOptions.cs @@ -14,7 +14,7 @@ namespace OpenIddict.Client.SystemNetHttp; /// /// Provides various settings needed to configure the OpenIddict client/System.Net.Http integration. /// -public class OpenIddictClientSystemNetHttpOptions +public sealed class OpenIddictClientSystemNetHttpOptions { /// /// Gets or sets the HTTP Polly error policy used by the internal OpenIddict HTTP clients. diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationBuilder.cs b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationBuilder.cs index 83772560..a134e619 100644 --- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationBuilder.cs +++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationBuilder.cs @@ -6,11 +6,11 @@ using System.ComponentModel; using OpenIddict.Client.WebIntegration; -using OpenIddict.Extensions; #if SUPPORTS_PEM_ENCODED_KEY_IMPORT using System.Security.Cryptography; using Microsoft.IdentityModel.Tokens; +using OpenIddict.Extensions; #endif namespace Microsoft.Extensions.DependencyInjection; @@ -18,7 +18,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// /// Exposes the necessary methods required to configure the OpenIddict client services. /// -public partial class OpenIddictClientWebIntegrationBuilder +public sealed partial class OpenIddictClientWebIntegrationBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationConfiguration.cs b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationConfiguration.cs index 8ba83c55..2bcd7c98 100644 --- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationConfiguration.cs +++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationConfiguration.cs @@ -11,7 +11,7 @@ namespace OpenIddict.Client.WebIntegration; /// /// Contains the methods required to ensure that the OpenIddict client Web integration configuration is valid. /// -public partial class OpenIddictClientWebIntegrationConfiguration : IConfigureOptions +public sealed partial class OpenIddictClientWebIntegrationConfiguration : IConfigureOptions { /// /// Populates the default OpenIddict client Web integration options diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Discovery.cs b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Discovery.cs index 3995bc7e..de286382 100644 --- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Discovery.cs +++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Discovery.cs @@ -26,7 +26,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// /// Contains the logic responsible for amending the issuer for the providers that require it. /// - public class AmendIssuer : IOpenIddictClientHandler + public sealed class AmendIssuer : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -67,7 +67,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// Contains the logic responsible for amending the supported /// client authentication methods for the providers that require it. /// - public class AmendClientAuthenticationMethods : IOpenIddictClientHandler + public sealed class AmendClientAuthenticationMethods : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -108,7 +108,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// Contains the logic responsible for amending the supported /// code challenge methods for the providers that require it. /// - public class AmendCodeChallengeMethods : IOpenIddictClientHandler + public sealed class AmendCodeChallengeMethods : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -145,7 +145,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// /// Contains the logic responsible for amending the endpoint URIs for the providers that require it. /// - public class AmendEndpoints : IOpenIddictClientHandler + public sealed class AmendEndpoints : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Exchange.cs b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Exchange.cs index 62f49568..1261276a 100644 --- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Exchange.cs +++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Exchange.cs @@ -31,7 +31,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// Contains the logic responsible for attaching non-standard query string /// parameters to the token request for the providers that require it. /// - public class AttachNonStandardQueryStringParameters : IOpenIddictClientHandler + public sealed class AttachNonStandardQueryStringParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -79,7 +79,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// Contains the logic responsible for attaching non-standard query string /// parameters to the token request for the providers that require it. /// - public class MapNonStandardResponseParameters : IOpenIddictClientHandler + public sealed class MapNonStandardResponseParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Protection.cs b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Protection.cs index 6c3f348b..de56bac5 100644 --- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Protection.cs +++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Protection.cs @@ -23,7 +23,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// /// Contains the logic responsible for amending the token validation parameters for the providers that require it. /// - public class AmendTokenValidationParameters : IOpenIddictClientHandler + public sealed class AmendTokenValidationParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Userinfo.cs b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Userinfo.cs index 93df7ac1..7349d8e7 100644 --- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Userinfo.cs +++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Userinfo.cs @@ -32,7 +32,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// Contains the logic responsible for attaching the access token /// parameter to the request for the providers that require it. /// - public class AttachAccessTokenParameter : IOpenIddictClientHandler + public sealed class AttachAccessTokenParameter : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -76,7 +76,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// Contains the logic responsible for extracting the userinfo response /// from nested JSON nodes (e.g "data") for the providers that require it. /// - public class UnwrapUserinfoResponse : IOpenIddictClientHandler + public sealed class UnwrapUserinfoResponse : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs index b24e14d5..205cd171 100644 --- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs +++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs @@ -42,7 +42,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// Contains the logic responsible for handling non-standard /// authorization errors for the providers that require it. /// - public class HandleNonStandardFrontchannelErrorResponse : IOpenIddictClientHandler + public sealed class HandleNonStandardFrontchannelErrorResponse : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -110,7 +110,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// Contains the logic responsible for amending the client /// assertion methods for the providers that require it. /// - public class AttachNonStandardClientAssertionTokenClaims : IOpenIddictClientHandler + public sealed class AttachNonStandardClientAssertionTokenClaims : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -154,7 +154,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// Contains the logic responsible for attaching custom client credentials /// parameters to the token request for the providers that require it. /// - public class AttachTokenRequestNonStandardClientCredentials : IOpenIddictClientHandler + public sealed class AttachTokenRequestNonStandardClientCredentials : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -199,7 +199,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// Contains the logic responsible for attaching custom client credentials /// parameters to the token request for the providers that require it. /// - public class AdjustRedirectUriInTokenRequest : IOpenIddictClientHandler + public sealed class AdjustRedirectUriInTokenRequest : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -254,7 +254,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// Contains the logic responsible for overriding the set /// of required tokens for the providers that require it. /// - public class OverrideValidatedBackchannelTokens : IOpenIddictClientHandler + public sealed class OverrideValidatedBackchannelTokens : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -295,7 +295,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// Contains the logic responsible for attaching additional parameters /// to the userinfo request for the providers that require it. /// - public class AttachAdditionalUserinfoRequestParameters : IOpenIddictClientHandler + public sealed class AttachAdditionalUserinfoRequestParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -357,7 +357,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// /// Contains the logic responsible for overriding response mode for providers that require it. /// - public class OverrideResponseMode : IOpenIddictClientHandler + public sealed class OverrideResponseMode : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -397,7 +397,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// Contains the logic responsible for overriding the standard "scope" /// parameter for providers that are known to use a non-standard format. /// - public class FormatNonStandardScopeParameter : IOpenIddictClientHandler + public sealed class FormatNonStandardScopeParameter : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -435,7 +435,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers /// Contains the logic responsible for persisting the state parameter in the redirect URI for /// providers that don't support it but allow arbitrary dynamic parameters in redirect_uri. /// - public class IncludeStateParameterInRedirectUri : IOpenIddictClientHandler + public sealed class IncludeStateParameterInRedirectUri : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationOptions.cs b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationOptions.cs index 62295e17..0d53a66f 100644 --- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationOptions.cs +++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationOptions.cs @@ -9,7 +9,7 @@ namespace OpenIddict.Client.WebIntegration; /// /// Provides various settings needed to configure the OpenIddict client Web integration. /// -public partial class OpenIddictClientWebIntegrationOptions +public sealed partial class OpenIddictClientWebIntegrationOptions { // Note: provider options are automatically generated by the source generator. } diff --git a/src/OpenIddict.Client/OpenIddictClientBuilder.cs b/src/OpenIddict.Client/OpenIddictClientBuilder.cs index 6e0d197f..0209471b 100644 --- a/src/OpenIddict.Client/OpenIddictClientBuilder.cs +++ b/src/OpenIddict.Client/OpenIddictClientBuilder.cs @@ -20,7 +20,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// /// Exposes the necessary methods required to configure the OpenIddict client services. /// -public class OpenIddictClientBuilder +public sealed class OpenIddictClientBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Client/OpenIddictClientConfiguration.cs b/src/OpenIddict.Client/OpenIddictClientConfiguration.cs index 26cdbe1c..958658ef 100644 --- a/src/OpenIddict.Client/OpenIddictClientConfiguration.cs +++ b/src/OpenIddict.Client/OpenIddictClientConfiguration.cs @@ -14,7 +14,7 @@ namespace OpenIddict.Client; /// /// Contains the methods required to ensure that the OpenIddict client configuration is valid. /// -public class OpenIddictClientConfiguration : IPostConfigureOptions +public sealed class OpenIddictClientConfiguration : IPostConfigureOptions { private readonly OpenIddictClientService _service; diff --git a/src/OpenIddict.Client/OpenIddictClientDispatcher.cs b/src/OpenIddict.Client/OpenIddictClientDispatcher.cs index 3f2bcda2..0ad65cd6 100644 --- a/src/OpenIddict.Client/OpenIddictClientDispatcher.cs +++ b/src/OpenIddict.Client/OpenIddictClientDispatcher.cs @@ -9,7 +9,7 @@ using Microsoft.Extensions.Options; namespace OpenIddict.Client; -public class OpenIddictClientDispatcher : IOpenIddictClientDispatcher +public sealed class OpenIddictClientDispatcher : IOpenIddictClientDispatcher { private readonly ILogger _logger; private readonly IOptionsMonitor _options; diff --git a/src/OpenIddict.Client/OpenIddictClientEvents.Authentication.cs b/src/OpenIddict.Client/OpenIddictClientEvents.Authentication.cs index 1bdc7e76..46a2faad 100644 --- a/src/OpenIddict.Client/OpenIddictClientEvents.Authentication.cs +++ b/src/OpenIddict.Client/OpenIddictClientEvents.Authentication.cs @@ -14,7 +14,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the authorization endpoint to give the user code /// a chance to manually update the authorization request before it is sent to the identity provider. /// - public class PrepareAuthorizationRequestContext : BaseValidatingContext + public sealed class PrepareAuthorizationRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -43,7 +43,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the authorization endpoint /// to give the user code a chance to manually send the authorization request. /// - public class ApplyAuthorizationRequestContext : BaseValidatingContext + public sealed class ApplyAuthorizationRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -69,7 +69,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the redirection endpoint to give the user code /// a chance to manually extract the redirection request from the ambient HTTP context. /// - public class ExtractRedirectionRequestContext : BaseValidatingContext + public sealed class ExtractRedirectionRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -93,7 +93,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the redirection endpoint /// to determine if the request is valid and should continue to be processed. /// - public class ValidateRedirectionRequestContext : BaseValidatingContext + public sealed class ValidateRedirectionRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -130,7 +130,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each validated redirection request /// to allow the user code to decide how the request should be handled. /// - public class HandleRedirectionRequestContext : BaseValidatingTicketContext + public sealed class HandleRedirectionRequestContext : BaseValidatingTicketContext { /// /// Creates a new instance of the class. @@ -159,7 +159,7 @@ public static partial class OpenIddictClientEvents /// /// Represents an event called before the redirection response is returned to the caller. /// - public class ApplyRedirectionResponseContext : BaseRequestContext + public sealed class ApplyRedirectionResponseContext : BaseRequestContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Client/OpenIddictClientEvents.Discovery.cs b/src/OpenIddict.Client/OpenIddictClientEvents.Discovery.cs index 3d46fb27..b12d3e68 100644 --- a/src/OpenIddict.Client/OpenIddictClientEvents.Discovery.cs +++ b/src/OpenIddict.Client/OpenIddictClientEvents.Discovery.cs @@ -14,7 +14,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the configuration endpoint /// to give the user code a chance to add parameters to the configuration request. /// - public class PrepareConfigurationRequestContext : BaseExternalContext + public sealed class PrepareConfigurationRequestContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -38,7 +38,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the configuration endpoint /// to send the configuration request to the remote authorization server. /// - public class ApplyConfigurationRequestContext : BaseExternalContext + public sealed class ApplyConfigurationRequestContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -62,7 +62,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each configuration response /// to extract the response parameters from the server response. /// - public class ExtractConfigurationResponseContext : BaseExternalContext + public sealed class ExtractConfigurationResponseContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -94,7 +94,7 @@ public static partial class OpenIddictClientEvents /// /// Represents an event called for each validated configuration response. /// - public class HandleConfigurationResponseContext : BaseExternalContext + public sealed class HandleConfigurationResponseContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -126,7 +126,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the cryptography endpoint /// to give the user code a chance to add parameters to the cryptography request. /// - public class PrepareCryptographyRequestContext : BaseExternalContext + public sealed class PrepareCryptographyRequestContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -150,7 +150,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the cryptography endpoint /// to send the cryptography request to the remote authorization server. /// - public class ApplyCryptographyRequestContext : BaseExternalContext + public sealed class ApplyCryptographyRequestContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -174,7 +174,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each cryptography response /// to extract the response parameters from the server response. /// - public class ExtractCryptographyResponseContext : BaseExternalContext + public sealed class ExtractCryptographyResponseContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -206,7 +206,7 @@ public static partial class OpenIddictClientEvents /// /// Represents an event called for each validated cryptography response. /// - public class HandleCryptographyResponseContext : BaseExternalContext + public sealed class HandleCryptographyResponseContext : BaseExternalContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Client/OpenIddictClientEvents.Exchange.cs b/src/OpenIddict.Client/OpenIddictClientEvents.Exchange.cs index 0e7982bf..30853582 100644 --- a/src/OpenIddict.Client/OpenIddictClientEvents.Exchange.cs +++ b/src/OpenIddict.Client/OpenIddictClientEvents.Exchange.cs @@ -14,7 +14,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the token endpoint /// to give the user code a chance to add parameters to the token request. /// - public class PrepareTokenRequestContext : BaseExternalContext + public sealed class PrepareTokenRequestContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -48,7 +48,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the token endpoint /// to send the token request to the remote authorization server. /// - public class ApplyTokenRequestContext : BaseExternalContext + public sealed class ApplyTokenRequestContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -72,7 +72,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each token response /// to extract the response parameters from the server response. /// - public class ExtractTokenResponseContext : BaseExternalContext + public sealed class ExtractTokenResponseContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -104,7 +104,7 @@ public static partial class OpenIddictClientEvents /// /// Represents an event called for each token response. /// - public class HandleTokenResponseContext : BaseExternalContext + public sealed class HandleTokenResponseContext : BaseExternalContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Client/OpenIddictClientEvents.Protection.cs b/src/OpenIddict.Client/OpenIddictClientEvents.Protection.cs index f6885e0e..b820d29c 100644 --- a/src/OpenIddict.Client/OpenIddictClientEvents.Protection.cs +++ b/src/OpenIddict.Client/OpenIddictClientEvents.Protection.cs @@ -15,7 +15,7 @@ public static partial class OpenIddictClientEvents /// /// Represents an event called when generating a token. /// - public class GenerateTokenContext : BaseValidatingContext + public sealed class GenerateTokenContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -85,7 +85,7 @@ public static partial class OpenIddictClientEvents /// /// Represents an event called when validating a token. /// - public class ValidateTokenContext : BaseValidatingContext + public sealed class ValidateTokenContext : BaseValidatingContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Client/OpenIddictClientEvents.Session.cs b/src/OpenIddict.Client/OpenIddictClientEvents.Session.cs index cc5fbfda..73beb9e0 100644 --- a/src/OpenIddict.Client/OpenIddictClientEvents.Session.cs +++ b/src/OpenIddict.Client/OpenIddictClientEvents.Session.cs @@ -14,7 +14,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the logout endpoint to give the user code /// a chance to manually update the logout request before it is sent to the identity provider. /// - public class PrepareLogoutRequestContext : BaseValidatingContext + public sealed class PrepareLogoutRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -43,7 +43,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the logout endpoint /// to give the user code a chance to manually send the logout request. /// - public class ApplyLogoutRequestContext : BaseValidatingContext + public sealed class ApplyLogoutRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -69,7 +69,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the post-logout redirection endpoint to give the user code /// a chance to manually extract the redirection request from the ambient HTTP context. /// - public class ExtractPostLogoutRedirectionRequestContext : BaseValidatingContext + public sealed class ExtractPostLogoutRedirectionRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -93,7 +93,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the post-logout redirection endpoint /// to determine if the request is valid and should continue to be processed. /// - public class ValidatePostLogoutRedirectionRequestContext : BaseValidatingContext + public sealed class ValidatePostLogoutRedirectionRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -130,7 +130,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each validated redirection request /// to allow the user code to decide how the request should be handled. /// - public class HandlePostLogoutRedirectionRequestContext : BaseValidatingTicketContext + public sealed class HandlePostLogoutRedirectionRequestContext : BaseValidatingTicketContext { /// /// Creates a new instance of the class. @@ -159,7 +159,7 @@ public static partial class OpenIddictClientEvents /// /// Represents an event called before the redirection response is returned to the caller. /// - public class ApplyPostLogoutRedirectionResponseContext : BaseRequestContext + public sealed class ApplyPostLogoutRedirectionResponseContext : BaseRequestContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Client/OpenIddictClientEvents.Userinfo.cs b/src/OpenIddict.Client/OpenIddictClientEvents.Userinfo.cs index 86a9199a..d9cde455 100644 --- a/src/OpenIddict.Client/OpenIddictClientEvents.Userinfo.cs +++ b/src/OpenIddict.Client/OpenIddictClientEvents.Userinfo.cs @@ -14,7 +14,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the userinfo endpoint /// to give the user code a chance to add parameters to the userinfo request. /// - public class PrepareUserinfoRequestContext : BaseExternalContext + public sealed class PrepareUserinfoRequestContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -38,7 +38,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each request to the userinfo endpoint /// to send the userinfo request to the remote authorization server. /// - public class ApplyUserinfoRequestContext : BaseExternalContext + public sealed class ApplyUserinfoRequestContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -62,7 +62,7 @@ public static partial class OpenIddictClientEvents /// Represents an event called for each userinfo response /// to extract the response parameters from the server response. /// - public class ExtractUserinfoResponseContext : BaseExternalContext + public sealed class ExtractUserinfoResponseContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -99,7 +99,7 @@ public static partial class OpenIddictClientEvents /// /// Represents an event called for each userinfo response. /// - public class HandleUserinfoResponseContext : BaseExternalContext + public sealed class HandleUserinfoResponseContext : BaseExternalContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Client/OpenIddictClientEvents.cs b/src/OpenIddict.Client/OpenIddictClientEvents.cs index 7175467d..100e9be2 100644 --- a/src/OpenIddict.Client/OpenIddictClientEvents.cs +++ b/src/OpenIddict.Client/OpenIddictClientEvents.cs @@ -209,7 +209,7 @@ public static partial class OpenIddictClientEvents /// /// Represents an event called when processing an incoming request. /// - public class ProcessRequestContext : BaseValidatingContext + public sealed class ProcessRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -223,7 +223,7 @@ public static partial class OpenIddictClientEvents /// /// Represents an event called when processing an errored response. /// - public class ProcessErrorContext : BaseRequestContext + public sealed class ProcessErrorContext : BaseRequestContext { /// /// Creates a new instance of the class. @@ -275,7 +275,7 @@ public static partial class OpenIddictClientEvents /// /// Represents an event called when processing an authentication operation. /// - public class ProcessAuthenticationContext : BaseValidatingContext + public sealed class ProcessAuthenticationContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -671,7 +671,7 @@ public static partial class OpenIddictClientEvents /// /// Represents an event called when processing a challenge response. /// - public class ProcessChallengeContext : BaseValidatingTicketContext + public sealed class ProcessChallengeContext : BaseValidatingTicketContext { /// /// Creates a new instance of the class. @@ -828,7 +828,7 @@ public static partial class OpenIddictClientEvents /// /// Represents an event called when processing a sign-out response. /// - public class ProcessSignOutContext : BaseValidatingTicketContext + public sealed class ProcessSignOutContext : BaseValidatingTicketContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Client/OpenIddictClientFactory.cs b/src/OpenIddict.Client/OpenIddictClientFactory.cs index 67e0ae99..a6ece909 100644 --- a/src/OpenIddict.Client/OpenIddictClientFactory.cs +++ b/src/OpenIddict.Client/OpenIddictClientFactory.cs @@ -9,7 +9,7 @@ using Microsoft.Extensions.Options; namespace OpenIddict.Client; -public class OpenIddictClientFactory : IOpenIddictClientFactory +public sealed class OpenIddictClientFactory : IOpenIddictClientFactory { private readonly ILogger _logger; private readonly IOptionsMonitor _options; diff --git a/src/OpenIddict.Client/OpenIddictClientHandler.cs b/src/OpenIddict.Client/OpenIddictClientHandler.cs index 9abeaaf9..fa4b234d 100644 --- a/src/OpenIddict.Client/OpenIddictClientHandler.cs +++ b/src/OpenIddict.Client/OpenIddictClientHandler.cs @@ -10,7 +10,7 @@ namespace OpenIddict.Client; /// Represents a handler able to process events. /// /// The type of the events handled by this instance. -public class OpenIddictClientHandler : IOpenIddictClientHandler where TContext : BaseContext +public sealed class OpenIddictClientHandler : IOpenIddictClientHandler where TContext : BaseContext { private readonly Func _handler; diff --git a/src/OpenIddict.Client/OpenIddictClientHandlerDescriptor.cs b/src/OpenIddict.Client/OpenIddictClientHandlerDescriptor.cs index 3bb67965..3cf2eb6c 100644 --- a/src/OpenIddict.Client/OpenIddictClientHandlerDescriptor.cs +++ b/src/OpenIddict.Client/OpenIddictClientHandlerDescriptor.cs @@ -15,7 +15,7 @@ namespace OpenIddict.Client; /// Represents an immutable descriptor of an OpenIddict client event handler. /// [DebuggerDisplay("{ServiceDescriptor?.ServiceType}")] -public class OpenIddictClientHandlerDescriptor +public sealed class OpenIddictClientHandlerDescriptor { /// /// Creates a new instance of the class. @@ -60,7 +60,7 @@ public class OpenIddictClientHandlerDescriptor /// Contains methods allowing to build a descriptor instance. /// /// The event context type. - public class Builder where TContext : BaseContext + public sealed class Builder where TContext : BaseContext { private ServiceDescriptor? _descriptor; private readonly List _filters = new(); diff --git a/src/OpenIddict.Client/OpenIddictClientHandlerFilters.cs b/src/OpenIddict.Client/OpenIddictClientHandlerFilters.cs index 0c815b53..bea9a2ed 100644 --- a/src/OpenIddict.Client/OpenIddictClientHandlerFilters.cs +++ b/src/OpenIddict.Client/OpenIddictClientHandlerFilters.cs @@ -14,7 +14,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no authorization code is validated. /// - public class RequireAuthorizationCodeValidated : IOpenIddictClientHandlerFilter + public sealed class RequireAuthorizationCodeValidated : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -30,7 +30,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no backchannel access token is validated. /// - public class RequireBackchannelAccessTokenValidated : IOpenIddictClientHandlerFilter + public sealed class RequireBackchannelAccessTokenValidated : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -46,7 +46,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no backchannel identity token principal is available. /// - public class RequireBackchannelIdentityTokenPrincipal : IOpenIddictClientHandlerFilter + public sealed class RequireBackchannelIdentityTokenPrincipal : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -62,7 +62,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no backchannel identity token is validated. /// - public class RequireBackchannelIdentityTokenValidated : IOpenIddictClientHandlerFilter + public sealed class RequireBackchannelIdentityTokenValidated : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -78,7 +78,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no client assertion token is generated. /// - public class RequireClientAssertionTokenGenerated : IOpenIddictClientHandlerFilter + public sealed class RequireClientAssertionTokenGenerated : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -94,7 +94,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no frontchannel access token is validated. /// - public class RequireFrontchannelAccessTokenValidated : IOpenIddictClientHandlerFilter + public sealed class RequireFrontchannelAccessTokenValidated : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -110,7 +110,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no frontchannel identity token principal is available. /// - public class RequireFrontchannelIdentityTokenPrincipal : IOpenIddictClientHandlerFilter + public sealed class RequireFrontchannelIdentityTokenPrincipal : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -126,7 +126,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no frontchannel identity token is validated. /// - public class RequireFrontchannelIdentityTokenValidated : IOpenIddictClientHandlerFilter + public sealed class RequireFrontchannelIdentityTokenValidated : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -143,7 +143,7 @@ public static class OpenIddictClientHandlerFilters /// Represents a filter that excludes the associated handlers if the challenge /// doesn't correspond to an authorization code or implicit grant operation. /// - public class RequireInteractiveGrantType : IOpenIddictClientHandlerFilter + public sealed class RequireInteractiveGrantType : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessChallengeContext context) { @@ -159,7 +159,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if the selected token format is not JSON Web Token. /// - public class RequireJsonWebTokenFormat : IOpenIddictClientHandlerFilter + public sealed class RequireJsonWebTokenFormat : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(GenerateTokenContext context) { @@ -175,7 +175,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no login state token is generated. /// - public class RequireLoginStateTokenGenerated : IOpenIddictClientHandlerFilter + public sealed class RequireLoginStateTokenGenerated : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessChallengeContext context) { @@ -191,7 +191,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no logout state token is generated. /// - public class RequireLogoutStateTokenGenerated : IOpenIddictClientHandlerFilter + public sealed class RequireLogoutStateTokenGenerated : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessSignOutContext context) { @@ -207,7 +207,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if the request is not a post-logout redirection request. /// - public class RequirePostLogoutRedirectionRequest : IOpenIddictClientHandlerFilter + public sealed class RequirePostLogoutRedirectionRequest : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -223,7 +223,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if the request is not a redirection request. /// - public class RequireRedirectionRequest : IOpenIddictClientHandlerFilter + public sealed class RequireRedirectionRequest : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -239,7 +239,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no refresh token is validated. /// - public class RequireRefreshTokenValidated : IOpenIddictClientHandlerFilter + public sealed class RequireRefreshTokenValidated : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -255,7 +255,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no state token principal is available. /// - public class RequireStateTokenPrincipal : IOpenIddictClientHandlerFilter + public sealed class RequireStateTokenPrincipal : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -271,7 +271,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no state token is validated. /// - public class RequireStateTokenValidated : IOpenIddictClientHandlerFilter + public sealed class RequireStateTokenValidated : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -287,7 +287,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no token entry is created in the database. /// - public class RequireTokenEntryCreated : IOpenIddictClientHandlerFilter + public sealed class RequireTokenEntryCreated : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(GenerateTokenContext context) { @@ -303,7 +303,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if the token payload is not persisted in the database. /// - public class RequireTokenPayloadPersisted : IOpenIddictClientHandlerFilter + public sealed class RequireTokenPayloadPersisted : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(GenerateTokenContext context) { @@ -319,7 +319,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no token request is expected to be sent. /// - public class RequireTokenRequest : IOpenIddictClientHandlerFilter + public sealed class RequireTokenRequest : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -335,7 +335,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if token storage was not enabled. /// - public class RequireTokenStorageEnabled : IOpenIddictClientHandlerFilter + public sealed class RequireTokenStorageEnabled : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -351,7 +351,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no userinfo request is expected to be sent. /// - public class RequireUserinfoRequest : IOpenIddictClientHandlerFilter + public sealed class RequireUserinfoRequest : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -367,7 +367,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no userinfo token is extracted. /// - public class RequireUserinfoTokenExtracted : IOpenIddictClientHandlerFilter + public sealed class RequireUserinfoTokenExtracted : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -383,7 +383,7 @@ public static class OpenIddictClientHandlerFilters /// /// Represents a filter that excludes the associated handlers if no userinfo token principal is available. /// - public class RequireUserinfoTokenPrincipal : IOpenIddictClientHandlerFilter + public sealed class RequireUserinfoTokenPrincipal : IOpenIddictClientHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { diff --git a/src/OpenIddict.Client/OpenIddictClientHandlers.Authentication.cs b/src/OpenIddict.Client/OpenIddictClientHandlers.Authentication.cs index cc556195..2246f7fe 100644 --- a/src/OpenIddict.Client/OpenIddictClientHandlers.Authentication.cs +++ b/src/OpenIddict.Client/OpenIddictClientHandlers.Authentication.cs @@ -47,7 +47,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for preparing authorization requests and invoking the corresponding event handlers. /// - public class PrepareAuthorizationRequest : IOpenIddictClientHandler + public sealed class PrepareAuthorizationRequest : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -92,7 +92,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for applying authorization requests and invoking the corresponding event handlers. /// - public class ApplyAuthorizationRequest : IOpenIddictClientHandler + public sealed class ApplyAuthorizationRequest : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -137,7 +137,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the address of the authorization request to the request. /// - public class AttachAuthorizationEndpoint : IOpenIddictClientHandler + public sealed class AttachAuthorizationEndpoint : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -172,7 +172,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for extracting redirection requests and invoking the corresponding event handlers. /// - public class ExtractRedirectionRequest : IOpenIddictClientHandler + public sealed class ExtractRedirectionRequest : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -233,7 +233,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating redirection requests and invoking the corresponding event handlers. /// - public class ValidateRedirectionRequest : IOpenIddictClientHandler + public sealed class ValidateRedirectionRequest : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -290,7 +290,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for handling redirection requests and invoking the corresponding event handlers. /// - public class HandleRedirectionRequest : IOpenIddictClientHandler + public sealed class HandleRedirectionRequest : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -346,7 +346,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for processing redirection responses and invoking the corresponding event handlers. /// - public class ApplyRedirectionResponse : IOpenIddictClientHandler where TContext : BaseRequestContext + public sealed class ApplyRedirectionResponse : IOpenIddictClientHandler where TContext : BaseRequestContext { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -395,7 +395,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for removing the response mode parameter from the /// request if it corresponds to the default mode for the selected response type. /// - public class NormalizeResponseModeParameter : IOpenIddictClientHandler + public sealed class NormalizeResponseModeParameter : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -440,7 +440,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for rejecting redirection requests that don't /// specify a valid access token, authorization code, identity token or state token. /// - public class ValidateTokens : IOpenIddictClientHandler + public sealed class ValidateTokens : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; diff --git a/src/OpenIddict.Client/OpenIddictClientHandlers.Discovery.cs b/src/OpenIddict.Client/OpenIddictClientHandlers.Discovery.cs index 8a5cb767..793b0225 100644 --- a/src/OpenIddict.Client/OpenIddictClientHandlers.Discovery.cs +++ b/src/OpenIddict.Client/OpenIddictClientHandlers.Discovery.cs @@ -45,7 +45,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the well-known parameters contained in the configuration response. /// - public class ValidateWellKnownConfigurationParameters : IOpenIddictClientHandler + public sealed class ValidateWellKnownConfigurationParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -138,7 +138,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for surfacing potential errors from the configuration response. /// - public class HandleConfigurationErrorResponse : IOpenIddictClientHandler + public sealed class HandleConfigurationErrorResponse : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -181,7 +181,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for extracting the issuer from the discovery document. /// - public class ValidateIssuer : IOpenIddictClientHandler + public sealed class ValidateIssuer : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -244,7 +244,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for extracting the authorization endpoint address from the discovery document. /// - public class ExtractAuthorizationEndpoint : IOpenIddictClientHandler + public sealed class ExtractAuthorizationEndpoint : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -296,7 +296,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for extracting the JWKS endpoint address from the discovery document. /// - public class ExtractCryptographyEndpoint : IOpenIddictClientHandler + public sealed class ExtractCryptographyEndpoint : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -348,7 +348,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for extracting the logout endpoint address from the discovery document. /// - public class ExtractLogoutEndpoint : IOpenIddictClientHandler + public sealed class ExtractLogoutEndpoint : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -391,7 +391,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for extracting the token endpoint address from the discovery document. /// - public class ExtractTokenEndpoint : IOpenIddictClientHandler + public sealed class ExtractTokenEndpoint : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -434,7 +434,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for extracting the userinfo endpoint address from the discovery document. /// - public class ExtractUserinfoEndpoint : IOpenIddictClientHandler + public sealed class ExtractUserinfoEndpoint : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -477,7 +477,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for extracting the supported grant types from the discovery document. /// - public class ExtractGrantTypes : IOpenIddictClientHandler + public sealed class ExtractGrantTypes : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -519,7 +519,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for extracting the supported response types from the discovery document. /// - public class ExtractResponseModes : IOpenIddictClientHandler + public sealed class ExtractResponseModes : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -561,7 +561,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for extracting the supported response types from the discovery document. /// - public class ExtractResponseTypes : IOpenIddictClientHandler + public sealed class ExtractResponseTypes : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -603,7 +603,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for extracting the supported code challenge methods from the discovery document. /// - public class ExtractCodeChallengeMethods : IOpenIddictClientHandler + public sealed class ExtractCodeChallengeMethods : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -645,7 +645,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for extracting the supported scopes from the discovery document. /// - public class ExtractScopes : IOpenIddictClientHandler + public sealed class ExtractScopes : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -688,7 +688,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for extracting the flag indicating /// whether the "iss" parameter is supported from the discovery document. /// - public class ExtractIssuerParameterRequirement : IOpenIddictClientHandler + public sealed class ExtractIssuerParameterRequirement : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -719,7 +719,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for extracting the authentication methods /// supported by the token endpoint from the discovery document. /// - public class ExtractTokenEndpointClientAuthenticationMethods : IOpenIddictClientHandler + public sealed class ExtractTokenEndpointClientAuthenticationMethods : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -761,7 +761,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the well-known parameters contained in the JWKS response. /// - public class ValidateWellKnownCryptographyParameters : IOpenIddictClientHandler + public sealed class ValidateWellKnownCryptographyParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -835,7 +835,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for surfacing potential errors from the cryptography response. /// - public class HandleCryptographyErrorResponse : IOpenIddictClientHandler + public sealed class HandleCryptographyErrorResponse : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -878,7 +878,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for extracting the signing keys from the JWKS document. /// - public class ExtractSigningKeys : IOpenIddictClientHandler + public sealed class ExtractSigningKeys : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client/OpenIddictClientHandlers.Exchange.cs b/src/OpenIddict.Client/OpenIddictClientHandlers.Exchange.cs index 8e9bb383..2ab603de 100644 --- a/src/OpenIddict.Client/OpenIddictClientHandlers.Exchange.cs +++ b/src/OpenIddict.Client/OpenIddictClientHandlers.Exchange.cs @@ -24,7 +24,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the well-known parameters contained in the token response. /// - public class ValidateWellKnownParameters : IOpenIddictClientHandler + public sealed class ValidateWellKnownParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -88,7 +88,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for surfacing potential errors from the token response. /// - public class HandleErrorResponse : IOpenIddictClientHandler + public sealed class HandleErrorResponse : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client/OpenIddictClientHandlers.Protection.cs b/src/OpenIddict.Client/OpenIddictClientHandlers.Protection.cs index 2f6be112..f4a31c40 100644 --- a/src/OpenIddict.Client/OpenIddictClientHandlers.Protection.cs +++ b/src/OpenIddict.Client/OpenIddictClientHandlers.Protection.cs @@ -44,7 +44,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for resolving the validation parameters used to validate tokens. /// - public class ResolveTokenValidationParameters : IOpenIddictClientHandler + public sealed class ResolveTokenValidationParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -150,7 +150,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for validating reference token identifiers. /// Note: this handler is not used when token storage is disabled. /// - public class ValidateReferenceTokenIdentifier : IOpenIddictClientHandler + public sealed class ValidateReferenceTokenIdentifier : IOpenIddictClientHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -217,7 +217,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating tokens generated using IdentityModel. /// - public class ValidateIdentityModelToken : IOpenIddictClientHandler + public sealed class ValidateIdentityModelToken : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -341,7 +341,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for mapping internal claims used by OpenIddict. /// - public class MapInternalClaims : IOpenIddictClientHandler + public sealed class MapInternalClaims : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -399,7 +399,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for restoring the properties associated with a reference token entry. /// Note: this handler is not used when token storage is disabled. /// - public class RestoreReferenceTokenProperties : IOpenIddictClientHandler + public sealed class RestoreReferenceTokenProperties : IOpenIddictClientHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -446,7 +446,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for rejecting authentication demands for which no valid principal was resolved. /// - public class ValidatePrincipal : IOpenIddictClientHandler + public sealed class ValidatePrincipal : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -498,7 +498,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for rejecting authentication demands that use an expired token. /// - public class ValidateExpirationDate : IOpenIddictClientHandler + public sealed class ValidateExpirationDate : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -540,7 +540,7 @@ public static partial class OpenIddictClientHandlers /// associated token entry is no longer valid (e.g was revoked). /// Note: this handler is not used when token storage is disabled. /// - public class ValidateTokenEntry : IOpenIddictClientHandler + public sealed class ValidateTokenEntry : IOpenIddictClientHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -634,7 +634,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for resolving the signing and encryption credentials used to protect tokens. /// - public class AttachSecurityCredentials : IOpenIddictClientHandler + public sealed class AttachSecurityCredentials : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -685,7 +685,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for creating a token entry. /// Note: this handler is not used when token storage is disabled. /// - public class CreateTokenEntry : IOpenIddictClientHandler + public sealed class CreateTokenEntry : IOpenIddictClientHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -742,7 +742,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for generating a token using IdentityModel. /// - public class GenerateIdentityModelToken : IOpenIddictClientHandler + public sealed class GenerateIdentityModelToken : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -840,7 +840,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for converting the token to a reference token. /// Note: this handler is not used when token storage is disabled. /// - public class ConvertReferenceToken : IOpenIddictClientHandler + public sealed class ConvertReferenceToken : IOpenIddictClientHandler { private readonly IOpenIddictTokenManager _tokenManager; diff --git a/src/OpenIddict.Client/OpenIddictClientHandlers.Session.cs b/src/OpenIddict.Client/OpenIddictClientHandlers.Session.cs index b0eeb19f..58ae4ea9 100644 --- a/src/OpenIddict.Client/OpenIddictClientHandlers.Session.cs +++ b/src/OpenIddict.Client/OpenIddictClientHandlers.Session.cs @@ -42,7 +42,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for preparing authorization requests and invoking the corresponding event handlers. /// - public class PrepareLogoutRequest : IOpenIddictClientHandler + public sealed class PrepareLogoutRequest : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -86,7 +86,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for applying authorization requests and invoking the corresponding event handlers. /// - public class ApplyLogoutRequest : IOpenIddictClientHandler + public sealed class ApplyLogoutRequest : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -130,7 +130,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the address of the authorization request to the request. /// - public class AttachLogoutEndpoint : IOpenIddictClientHandler + public sealed class AttachLogoutEndpoint : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -165,7 +165,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for extracting redirection requests and invoking the corresponding event handlers. /// - public class ExtractPostLogoutRedirectionRequest : IOpenIddictClientHandler + public sealed class ExtractPostLogoutRedirectionRequest : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -226,7 +226,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating redirection requests and invoking the corresponding event handlers. /// - public class ValidatePostLogoutRedirectionRequest : IOpenIddictClientHandler + public sealed class ValidatePostLogoutRedirectionRequest : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -283,7 +283,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for handling redirection requests and invoking the corresponding event handlers. /// - public class HandlePostLogoutRedirectionRequest : IOpenIddictClientHandler + public sealed class HandlePostLogoutRedirectionRequest : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -339,7 +339,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for processing redirection responses and invoking the corresponding event handlers. /// - public class ApplyPostLogoutRedirectionResponse : IOpenIddictClientHandler where TContext : BaseRequestContext + public sealed class ApplyPostLogoutRedirectionResponse : IOpenIddictClientHandler where TContext : BaseRequestContext { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -388,7 +388,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for rejecting redirection requests that don't /// specify a valid access token, authorization code, identity token or state token. /// - public class ValidateTokens : IOpenIddictClientHandler + public sealed class ValidateTokens : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; diff --git a/src/OpenIddict.Client/OpenIddictClientHandlers.Userinfo.cs b/src/OpenIddict.Client/OpenIddictClientHandlers.Userinfo.cs index bae995a9..7f5bc196 100644 --- a/src/OpenIddict.Client/OpenIddictClientHandlers.Userinfo.cs +++ b/src/OpenIddict.Client/OpenIddictClientHandlers.Userinfo.cs @@ -26,7 +26,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the well-known parameters contained in the userinfo response. /// - public class ValidateWellKnownParameters : IOpenIddictClientHandler + public sealed class ValidateWellKnownParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -92,7 +92,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for surfacing potential errors from the userinfo response. /// - public class HandleErrorResponse : IOpenIddictClientHandler + public sealed class HandleErrorResponse : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -138,7 +138,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for extracting the claims from the introspection response. /// - public class PopulateClaims : IOpenIddictClientHandler + public sealed class PopulateClaims : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client/OpenIddictClientHandlers.cs b/src/OpenIddict.Client/OpenIddictClientHandlers.cs index c388fd52..ea66b47d 100644 --- a/src/OpenIddict.Client/OpenIddictClientHandlers.cs +++ b/src/OpenIddict.Client/OpenIddictClientHandlers.cs @@ -143,7 +143,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for rejecting invalid authentication demands. /// - public class ValidateAuthenticationDemand : IOpenIddictClientHandler + public sealed class ValidateAuthenticationDemand : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -217,7 +217,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for determining the types of tokens to validate upfront. /// - public class EvaluateValidatedUpfrontTokens : IOpenIddictClientHandler + public sealed class EvaluateValidatedUpfrontTokens : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -265,7 +265,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for resolving the state token to validate upfront from the incoming request. /// - public class ResolveValidatedStateToken : IOpenIddictClientHandler + public sealed class ResolveValidatedStateToken : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -300,7 +300,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for rejecting authentication demands that lack the required state token. /// - public class ValidateRequiredStateToken : IOpenIddictClientHandler + public sealed class ValidateRequiredStateToken : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -339,7 +339,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the state token resolved from the context. /// - public class ValidateStateToken : IOpenIddictClientHandler + public sealed class ValidateStateToken : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -408,7 +408,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for redeeming the token entry corresponding to the received state token. /// Note: this handler is not used when the degraded mode is enabled. /// - public class RedeemStateTokenEntry : IOpenIddictClientHandler + public sealed class RedeemStateTokenEntry : IOpenIddictClientHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -468,7 +468,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for ensuring the resolved state /// token is suitable for the requested authentication demand. /// - public class ValidateStateTokenEndpointType : IOpenIddictClientHandler + public sealed class ValidateStateTokenEndpointType : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -518,7 +518,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for validating the request forgery protection claim that serves as a /// protection against state token injection, forged requests, denial of service and session fixation attacks. /// - public class ValidateRequestForgeryProtection : IOpenIddictClientHandler + public sealed class ValidateRequestForgeryProtection : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -588,7 +588,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for resolving the client registration /// based on the authorization server identity stored in the state token. /// - public class ResolveClientRegistrationFromStateToken : IOpenIddictClientHandler + public sealed class ResolveClientRegistrationFromStateToken : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -653,7 +653,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for ensuring the issuer parameter, if available, matches the expected issuer. /// - public class ValidateIssuerParameter : IOpenIddictClientHandler + public sealed class ValidateIssuerParameter : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -737,7 +737,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for rejecting errored authorization responses. /// - public class HandleFrontchannelErrorResponse : IOpenIddictClientHandler + public sealed class HandleFrontchannelErrorResponse : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -823,7 +823,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for resolving the grant type /// initially negotiated and stored in the state token, if applicable. /// - public class ResolveGrantTypeFromStateToken : IOpenIddictClientHandler + public sealed class ResolveGrantTypeFromStateToken : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -877,7 +877,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for resolving the response type /// initially negotiated and stored in the state token, if applicable. /// - public class ResolveResponseTypeFromStateToken : IOpenIddictClientHandler + public sealed class ResolveResponseTypeFromStateToken : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -911,7 +911,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for determining the set of frontchannel tokens to validate. /// - public class EvaluateValidatedFrontchannelTokens : IOpenIddictClientHandler + public sealed class EvaluateValidatedFrontchannelTokens : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -993,7 +993,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for resolving the token from the incoming request. /// - public class ResolveValidatedFrontchannelTokens : IOpenIddictClientHandler + public sealed class ResolveValidatedFrontchannelTokens : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1044,7 +1044,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for rejecting authentication demands that lack required tokens. /// - public class ValidateRequiredFrontchannelTokens : IOpenIddictClientHandler + public sealed class ValidateRequiredFrontchannelTokens : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1085,7 +1085,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the frontchannel identity token resolved from the context. /// - public class ValidateFrontchannelIdentityToken : IOpenIddictClientHandler + public sealed class ValidateFrontchannelIdentityToken : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -1153,7 +1153,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the well-known claims contained in the frontchannel identity token. /// - public class ValidateFrontchannelIdentityTokenWellknownClaims : IOpenIddictClientHandler + public sealed class ValidateFrontchannelIdentityTokenWellknownClaims : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1290,7 +1290,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the audience returned in the frontchannel identity token, if applicable. /// - public class ValidateFrontchannelIdentityTokenAudience : IOpenIddictClientHandler + public sealed class ValidateFrontchannelIdentityTokenAudience : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1335,7 +1335,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the presenter returned in the frontchannel identity token, if applicable. /// - public class ValidateFrontchannelIdentityTokenPresenter : IOpenIddictClientHandler + public sealed class ValidateFrontchannelIdentityTokenPresenter : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1378,7 +1378,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the nonce returned in the frontchannel identity token, if applicable. /// - public class ValidateFrontchannelIdentityTokenNonce : IOpenIddictClientHandler + public sealed class ValidateFrontchannelIdentityTokenNonce : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1487,7 +1487,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the digests of the frontchannel tokens, if applicable. /// - public class ValidateFrontchannelTokenDigests : IOpenIddictClientHandler + public sealed class ValidateFrontchannelTokenDigests : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1618,7 +1618,7 @@ public static partial class OpenIddictClientHandlers /// Note: this handler is typically not used for standard-compliant implementations as access tokens /// are supposed to be opaque to clients. /// - public class ValidateFrontchannelAccessToken : IOpenIddictClientHandler + public sealed class ValidateFrontchannelAccessToken : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -1688,7 +1688,7 @@ public static partial class OpenIddictClientHandlers /// Note: this handler is typically not used for standard-compliant implementations as authorization codes /// are supposed to be opaque to clients. /// - public class ValidateAuthorizationCode : IOpenIddictClientHandler + public sealed class ValidateAuthorizationCode : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -1756,7 +1756,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for resolving the address of the token endpoint. /// - public class ResolveTokenEndpoint : IOpenIddictClientHandler + public sealed class ResolveTokenEndpoint : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1789,7 +1789,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for determining whether a token request should be sent. /// - public class EvaluateTokenRequest : IOpenIddictClientHandler + public sealed class EvaluateTokenRequest : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1832,7 +1832,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the parameters to the token request, if applicable. /// - public class AttachTokenRequestParameters : IOpenIddictClientHandler + public sealed class AttachTokenRequestParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1909,7 +1909,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for selecting the token types that should /// be generated and optionally sent as part of the authentication demand. /// - public class EvaluateGeneratedClientAssertionToken : IOpenIddictClientHandler + public sealed class EvaluateGeneratedClientAssertionToken : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1950,7 +1950,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for preparing and attaching the claims principal /// used to generate the client assertion token, if one is going to be sent. /// - public class PrepareClientAssertionTokenPrincipal : IOpenIddictClientHandler + public sealed class PrepareClientAssertionTokenPrincipal : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2019,7 +2019,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for generating a client /// assertion token for the current authentication operation. /// - public class GenerateClientAssertionToken : IOpenIddictClientHandler + public sealed class GenerateClientAssertionToken : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -2091,7 +2091,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the client credentials to the token request, if applicable. /// - public class AttachTokenRequestClientCredentials : IOpenIddictClientHandler + public sealed class AttachTokenRequestClientCredentials : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2139,7 +2139,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for sending the token request, if applicable. /// - public class SendTokenRequest : IOpenIddictClientHandler + public sealed class SendTokenRequest : IOpenIddictClientHandler { private readonly OpenIddictClientService _service; @@ -2194,7 +2194,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for determining the set of backchannel tokens to validate. /// - public class EvaluateValidatedBackchannelTokens : IOpenIddictClientHandler + public sealed class EvaluateValidatedBackchannelTokens : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2299,7 +2299,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for resolving the backchannel tokens by sending a token request, if applicable. /// - public class ResolveValidatedBackchannelTokens : IOpenIddictClientHandler + public sealed class ResolveValidatedBackchannelTokens : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2346,7 +2346,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for rejecting authentication demands that lack required tokens. /// - public class ValidateRequiredBackchannelTokens : IOpenIddictClientHandler + public sealed class ValidateRequiredBackchannelTokens : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2388,7 +2388,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the backchannel identity token resolved from the context. /// - public class ValidateBackchannelIdentityToken : IOpenIddictClientHandler + public sealed class ValidateBackchannelIdentityToken : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -2456,7 +2456,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the well-known claims contained in the backchannel identity token. /// - public class ValidateBackchannelIdentityTokenWellknownClaims : IOpenIddictClientHandler + public sealed class ValidateBackchannelIdentityTokenWellknownClaims : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2593,7 +2593,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the audience returned in the backchannel identity token, if applicable. /// - public class ValidateBackchannelIdentityTokenAudience : IOpenIddictClientHandler + public sealed class ValidateBackchannelIdentityTokenAudience : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2638,7 +2638,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the presenter returned in the backchannel identity token, if applicable. /// - public class ValidateBackchannelIdentityTokenPresenter : IOpenIddictClientHandler + public sealed class ValidateBackchannelIdentityTokenPresenter : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2681,7 +2681,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the nonce returned in the backchannel identity token, if applicable. /// - public class ValidateBackchannelIdentityTokenNonce : IOpenIddictClientHandler + public sealed class ValidateBackchannelIdentityTokenNonce : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2790,7 +2790,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the digests of the backchannel access token. /// - public class ValidateBackchannelTokenDigests : IOpenIddictClientHandler + public sealed class ValidateBackchannelTokenDigests : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2885,7 +2885,7 @@ public static partial class OpenIddictClientHandlers /// Note: this handler is typically not used for standard-compliant implementations as access tokens /// are supposed to be opaque to clients. /// - public class ValidateBackchannelAccessToken : IOpenIddictClientHandler + public sealed class ValidateBackchannelAccessToken : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -2955,7 +2955,7 @@ public static partial class OpenIddictClientHandlers /// Note: this handler is typically not used for standard-compliant implementations as refresh tokens /// are supposed to be opaque to clients. /// - public class ValidateRefreshToken : IOpenIddictClientHandler + public sealed class ValidateRefreshToken : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -3023,7 +3023,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for resolving the address of the userinfo endpoint. /// - public class ResolveUserinfoEndpoint : IOpenIddictClientHandler + public sealed class ResolveUserinfoEndpoint : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3056,7 +3056,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for determining whether a userinfo request should be sent. /// - public class EvaluateUserinfoRequest : IOpenIddictClientHandler + public sealed class EvaluateUserinfoRequest : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3098,7 +3098,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the parameters to the userinfo request, if applicable. /// - public class AttachUserinfoRequestParameters : IOpenIddictClientHandler + public sealed class AttachUserinfoRequestParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3133,7 +3133,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for sending the userinfo request, if applicable. /// - public class SendUserinfoRequest : IOpenIddictClientHandler + public sealed class SendUserinfoRequest : IOpenIddictClientHandler { private readonly OpenIddictClientService _service; @@ -3192,7 +3192,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for determining whether a userinfo token should be validated. /// - public class EvaluateValidatedUserinfoToken : IOpenIddictClientHandler + public sealed class EvaluateValidatedUserinfoToken : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3226,7 +3226,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for rejecting authentication demands that lack the required userinfo token. /// - public class ValidateRequiredUserinfoToken : IOpenIddictClientHandler + public sealed class ValidateRequiredUserinfoToken : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3265,7 +3265,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the userinfo token resolved from the context. /// - public class ValidateUserinfoToken : IOpenIddictClientHandler + public sealed class ValidateUserinfoToken : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -3333,7 +3333,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the well-known claims contained in the userinfo token. /// - public class ValidateUserinfoTokenWellknownClaims : IOpenIddictClientHandler + public sealed class ValidateUserinfoTokenWellknownClaims : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3399,7 +3399,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for validating the subject claim contained in the userinfo token. /// - public class ValidateUserinfoTokenSubject : IOpenIddictClientHandler + public sealed class ValidateUserinfoTokenSubject : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3478,7 +3478,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for rejecting invalid challenge demands. /// - public class ValidateChallengeDemand : IOpenIddictClientHandler + public sealed class ValidateChallengeDemand : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3543,7 +3543,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for resolving the client registration applicable to the challenge demand. /// - public class ResolveClientRegistrationFromChallengeContext : IOpenIddictClientHandler + public sealed class ResolveClientRegistrationFromChallengeContext : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3588,7 +3588,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for resolving the best grant type /// supported by both the client and the authorization server. /// - public class AttachGrantType : IOpenIddictClientHandler + public sealed class AttachGrantType : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3671,7 +3671,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for selecting the token types that /// should be generated and optionally returned in the response. /// - public class EvaluateGeneratedChallengeTokens : IOpenIddictClientHandler + public sealed class EvaluateGeneratedChallengeTokens : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3715,7 +3715,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the user-defined properties to the authentication principal. /// - public class AttachChallengeHostProperties : IOpenIddictClientHandler + public sealed class AttachChallengeHostProperties : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3746,7 +3746,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the response type to the challenge request. /// - public class AttachResponseType : IOpenIddictClientHandler + public sealed class AttachResponseType : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3937,7 +3937,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the response mode to the challenge request. /// - public class AttachResponseMode : IOpenIddictClientHandler + public sealed class AttachResponseMode : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4042,7 +4042,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the client identifier to the challenge request. /// - public class AttachClientId : IOpenIddictClientHandler + public sealed class AttachClientId : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4071,7 +4071,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the redirect_uri to the challenge request. /// - public class AttachRedirectUri : IOpenIddictClientHandler + public sealed class AttachRedirectUri : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4104,7 +4104,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the scopes to the challenge request. /// - public class AttachScopes : IOpenIddictClientHandler + public sealed class AttachScopes : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4149,7 +4149,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching a request forgery protection to the authorization request. /// - public class AttachRequestForgeryProtection : IOpenIddictClientHandler + public sealed class AttachRequestForgeryProtection : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4181,7 +4181,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching a nonce to the authorization request. /// - public class AttachNonce : IOpenIddictClientHandler + public sealed class AttachNonce : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4221,7 +4221,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the code challenge parameters to the authorization request. /// - public class AttachCodeChallengeParameters : IOpenIddictClientHandler + public sealed class AttachCodeChallengeParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4314,7 +4314,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for preparing and attaching the claims principal /// used to generate the state token, if one is going to be returned. /// - public class PrepareStateTokenPrincipal : IOpenIddictClientHandler + public sealed class PrepareStateTokenPrincipal : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4429,7 +4429,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for generating a state token for the current challenge operation. /// - public class GenerateStateToken : IOpenIddictClientHandler + public sealed class GenerateStateToken : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -4495,7 +4495,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for ensuring the redirect_uri parameter is present /// if the "openid" scope is requested (indicating the request is an OpenID Connect request). /// - public class ValidateRedirectUriParameter : IOpenIddictClientHandler + public sealed class ValidateRedirectUriParameter : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4530,7 +4530,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the appropriate parameters to the challenge response. /// - public class AttachChallengeParameters : IOpenIddictClientHandler + public sealed class AttachChallengeParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4596,7 +4596,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for attaching the parameters /// populated from user-defined handlers to the challenge response. /// - public class AttachCustomChallengeParameters : IOpenIddictClientHandler + public sealed class AttachCustomChallengeParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4632,7 +4632,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for ensuring that the sign-out demand /// is compatible with the type of the endpoint that handled the request. /// - public class ValidateSignOutDemand : IOpenIddictClientHandler + public sealed class ValidateSignOutDemand : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4690,7 +4690,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for resolving the client registration applicable to the sign-out demand. /// - public class ResolveClientRegistrationFromSignOutContext : IOpenIddictClientHandler + public sealed class ResolveClientRegistrationFromSignOutContext : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4734,7 +4734,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the client identifier to the sign-out request. /// - public class AttachOptionalClientId : IOpenIddictClientHandler + public sealed class AttachOptionalClientId : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4763,7 +4763,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the post_logout_redirect_uri to the sign-out request. /// - public class AttachPostLogoutRedirectUri : IOpenIddictClientHandler + public sealed class AttachPostLogoutRedirectUri : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4793,7 +4793,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for selecting the token types that /// should be generated and optionally returned in the response. /// - public class EvaluateGeneratedLogoutTokens : IOpenIddictClientHandler + public sealed class EvaluateGeneratedLogoutTokens : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4822,7 +4822,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the user-defined properties to the authentication principal. /// - public class AttachSignOutHostProperties : IOpenIddictClientHandler + public sealed class AttachSignOutHostProperties : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4853,7 +4853,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching a request forgery protection to the logout request. /// - public class AttachLogoutRequestForgeryProtection : IOpenIddictClientHandler + public sealed class AttachLogoutRequestForgeryProtection : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4884,7 +4884,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching a nonce to the logout request. /// - public class AttachLogoutNonce : IOpenIddictClientHandler + public sealed class AttachLogoutNonce : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -4914,7 +4914,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for preparing and attaching the claims principal /// used to generate the logout state token, if one is going to be returned. /// - public class PrepareLogoutStateTokenPrincipal : IOpenIddictClientHandler + public sealed class PrepareLogoutStateTokenPrincipal : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -5008,7 +5008,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for generating a logout state token for the current sign-out operation. /// - public class GenerateLogoutStateToken : IOpenIddictClientHandler + public sealed class GenerateLogoutStateToken : IOpenIddictClientHandler { private readonly IOpenIddictClientDispatcher _dispatcher; @@ -5073,7 +5073,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the appropriate parameters to the sign-out response. /// - public class AttachSignOutParameters : IOpenIddictClientHandler + public sealed class AttachSignOutParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -5116,7 +5116,7 @@ public static partial class OpenIddictClientHandlers /// Contains the logic responsible for attaching the parameters /// populated from user-defined handlers to the sign-out response. /// - public class AttachCustomSignOutParameters : IOpenIddictClientHandler + public sealed class AttachCustomSignOutParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -5151,7 +5151,7 @@ public static partial class OpenIddictClientHandlers /// /// Contains the logic responsible for attaching the appropriate parameters to the error response. /// - public class AttachErrorParameters : IOpenIddictClientHandler + public sealed class AttachErrorParameters : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Client/OpenIddictClientOptions.cs b/src/OpenIddict.Client/OpenIddictClientOptions.cs index e406e6f7..f5a5412c 100644 --- a/src/OpenIddict.Client/OpenIddictClientOptions.cs +++ b/src/OpenIddict.Client/OpenIddictClientOptions.cs @@ -12,7 +12,7 @@ namespace OpenIddict.Client; /// /// Provides various settings needed to configure the OpenIddict client handler. /// -public class OpenIddictClientOptions +public sealed class OpenIddictClientOptions { /// /// Gets the list of the handlers responsible for processing the OpenIddict client operations. diff --git a/src/OpenIddict.Client/OpenIddictClientRegistration.cs b/src/OpenIddict.Client/OpenIddictClientRegistration.cs index f3c88efd..d9d364ae 100644 --- a/src/OpenIddict.Client/OpenIddictClientRegistration.cs +++ b/src/OpenIddict.Client/OpenIddictClientRegistration.cs @@ -14,7 +14,7 @@ namespace OpenIddict.Client; /// Contains the properties used to configure a client/server link. /// [DebuggerDisplay("{Issuer,nq}")] -public class OpenIddictClientRegistration +public sealed class OpenIddictClientRegistration { /// /// Gets or sets the client identifier assigned by the authorization server. diff --git a/src/OpenIddict.Client/OpenIddictClientRetriever.cs b/src/OpenIddict.Client/OpenIddictClientRetriever.cs index 166a2823..b70ed7a9 100644 --- a/src/OpenIddict.Client/OpenIddictClientRetriever.cs +++ b/src/OpenIddict.Client/OpenIddictClientRetriever.cs @@ -9,7 +9,7 @@ using Microsoft.IdentityModel.Protocols; namespace OpenIddict.Client; -public class OpenIddictClientRetriever : IConfigurationRetriever +public sealed class OpenIddictClientRetriever : IConfigurationRetriever { private readonly OpenIddictClientService _service; private readonly OpenIddictClientRegistration _registration; diff --git a/src/OpenIddict.Client/OpenIddictClientService.cs b/src/OpenIddict.Client/OpenIddictClientService.cs index eba54eda..2b8ddf09 100644 --- a/src/OpenIddict.Client/OpenIddictClientService.cs +++ b/src/OpenIddict.Client/OpenIddictClientService.cs @@ -14,7 +14,7 @@ using static OpenIddict.Abstractions.OpenIddictExceptions; namespace OpenIddict.Client; -public class OpenIddictClientService +public sealed class OpenIddictClientService { private readonly IServiceProvider _provider; diff --git a/src/OpenIddict.Client/OpenIddictClientTransaction.cs b/src/OpenIddict.Client/OpenIddictClientTransaction.cs index f169063a..61aa80c8 100644 --- a/src/OpenIddict.Client/OpenIddictClientTransaction.cs +++ b/src/OpenIddict.Client/OpenIddictClientTransaction.cs @@ -11,7 +11,7 @@ namespace OpenIddict.Client; /// /// Represents the context associated with an OpenID Connect client request. /// -public class OpenIddictClientTransaction +public sealed class OpenIddictClientTransaction { /// /// Gets or sets the type of the endpoint processing the current request. diff --git a/src/OpenIddict.Core/Caches/OpenIddictApplicationCache.cs b/src/OpenIddict.Core/Caches/OpenIddictApplicationCache.cs index 256f4442..868fd2f0 100644 --- a/src/OpenIddict.Core/Caches/OpenIddictApplicationCache.cs +++ b/src/OpenIddict.Core/Caches/OpenIddictApplicationCache.cs @@ -18,7 +18,7 @@ namespace OpenIddict.Core; /// Provides methods allowing to cache applications after retrieving them from the store. /// /// The type of the Application entity. -public class OpenIddictApplicationCache : IOpenIddictApplicationCache, IDisposable where TApplication : class +public sealed class OpenIddictApplicationCache : IOpenIddictApplicationCache, IDisposable where TApplication : class { private readonly MemoryCache _cache; private readonly ConcurrentDictionary _signals; @@ -279,7 +279,7 @@ public class OpenIddictApplicationCache : IOpenIddictApplicationCa /// The application to store in the cache entry, if applicable. /// The that can be used to abort the operation. /// A that can be used to monitor the asynchronous operation. - protected virtual async ValueTask CreateEntryAsync(object key, TApplication? application, CancellationToken cancellationToken) + private async ValueTask CreateEntryAsync(object key, TApplication? application, CancellationToken cancellationToken) { if (key is null) { @@ -305,8 +305,7 @@ public class OpenIddictApplicationCache : IOpenIddictApplicationCa /// The applications to store in the cache entry. /// The that can be used to abort the operation. /// A that can be used to monitor the asynchronous operation. - protected virtual async ValueTask CreateEntryAsync( - object key, ImmutableArray applications, CancellationToken cancellationToken) + private async ValueTask CreateEntryAsync(object key, ImmutableArray applications, CancellationToken cancellationToken) { if (key is null) { @@ -335,8 +334,7 @@ public class OpenIddictApplicationCache : IOpenIddictApplicationCa /// A that can be used to monitor the asynchronous operation, /// whose result returns an expiration signal for the specified application. /// - protected virtual async ValueTask CreateExpirationSignalAsync( - TApplication application, CancellationToken cancellationToken) + private async ValueTask CreateExpirationSignalAsync(TApplication application, CancellationToken cancellationToken) { if (application is null) { diff --git a/src/OpenIddict.Core/Caches/OpenIddictAuthorizationCache.cs b/src/OpenIddict.Core/Caches/OpenIddictAuthorizationCache.cs index e02be39d..631205bc 100644 --- a/src/OpenIddict.Core/Caches/OpenIddictAuthorizationCache.cs +++ b/src/OpenIddict.Core/Caches/OpenIddictAuthorizationCache.cs @@ -17,7 +17,7 @@ namespace OpenIddict.Core; /// Provides methods allowing to cache authorizations after retrieving them from the store. /// /// The type of the Authorization entity. -public class OpenIddictAuthorizationCache : IOpenIddictAuthorizationCache, IDisposable where TAuthorization : class +public sealed class OpenIddictAuthorizationCache : IOpenIddictAuthorizationCache, IDisposable where TAuthorization : class { private readonly MemoryCache _cache; private readonly ConcurrentDictionary _signals; @@ -452,7 +452,7 @@ public class OpenIddictAuthorizationCache : IOpenIddictAuthoriza /// The authorization to store in the cache entry, if applicable. /// The that can be used to abort the operation. /// A that can be used to monitor the asynchronous operation. - protected virtual async ValueTask CreateEntryAsync(object key, TAuthorization? authorization, CancellationToken cancellationToken) + private async ValueTask CreateEntryAsync(object key, TAuthorization? authorization, CancellationToken cancellationToken) { if (key is null) { @@ -478,8 +478,7 @@ public class OpenIddictAuthorizationCache : IOpenIddictAuthoriza /// The authorizations to store in the cache entry. /// The that can be used to abort the operation. /// A that can be used to monitor the asynchronous operation. - protected virtual async ValueTask CreateEntryAsync( - object key, ImmutableArray authorizations, CancellationToken cancellationToken) + private async ValueTask CreateEntryAsync(object key, ImmutableArray authorizations, CancellationToken cancellationToken) { if (key is null) { @@ -508,8 +507,7 @@ public class OpenIddictAuthorizationCache : IOpenIddictAuthoriza /// A that can be used to monitor the asynchronous operation, /// whose result returns an expiration signal for the specified authorization. /// - protected virtual async ValueTask CreateExpirationSignalAsync( - TAuthorization authorization, CancellationToken cancellationToken) + private async ValueTask CreateExpirationSignalAsync(TAuthorization authorization, CancellationToken cancellationToken) { if (authorization is null) { diff --git a/src/OpenIddict.Core/Caches/OpenIddictScopeCache.cs b/src/OpenIddict.Core/Caches/OpenIddictScopeCache.cs index 9e6874b1..e3f444d5 100644 --- a/src/OpenIddict.Core/Caches/OpenIddictScopeCache.cs +++ b/src/OpenIddict.Core/Caches/OpenIddictScopeCache.cs @@ -17,7 +17,7 @@ namespace OpenIddict.Core; /// Provides methods allowing to cache scopes after retrieving them from the store. /// /// The type of the Scope entity. -public class OpenIddictScopeCache : IOpenIddictScopeCache, IDisposable where TScope : class +public sealed class OpenIddictScopeCache : IOpenIddictScopeCache, IDisposable where TScope : class { private readonly MemoryCache _cache; private readonly ConcurrentDictionary _signals; @@ -249,7 +249,7 @@ public class OpenIddictScopeCache : IOpenIddictScopeCache, IDisp /// The scope to store in the cache entry, if applicable. /// The that can be used to abort the operation. /// A that can be used to monitor the asynchronous operation. - protected virtual async ValueTask CreateEntryAsync(object key, TScope? scope, CancellationToken cancellationToken) + private async ValueTask CreateEntryAsync(object key, TScope? scope, CancellationToken cancellationToken) { if (key is null) { @@ -275,8 +275,7 @@ public class OpenIddictScopeCache : IOpenIddictScopeCache, IDisp /// The scopes to store in the cache entry. /// The that can be used to abort the operation. /// A that can be used to monitor the asynchronous operation. - protected virtual async ValueTask CreateEntryAsync( - object key, ImmutableArray scopes, CancellationToken cancellationToken) + private async ValueTask CreateEntryAsync(object key, ImmutableArray scopes, CancellationToken cancellationToken) { if (key is null) { @@ -305,7 +304,7 @@ public class OpenIddictScopeCache : IOpenIddictScopeCache, IDisp /// A that can be used to monitor the asynchronous operation, /// whose result returns an expiration signal for the specified scope. /// - protected virtual async ValueTask CreateExpirationSignalAsync(TScope scope, CancellationToken cancellationToken) + private async ValueTask CreateExpirationSignalAsync(TScope scope, CancellationToken cancellationToken) { if (scope is null) { diff --git a/src/OpenIddict.Core/Caches/OpenIddictTokenCache.cs b/src/OpenIddict.Core/Caches/OpenIddictTokenCache.cs index 7b98dc08..7d310867 100644 --- a/src/OpenIddict.Core/Caches/OpenIddictTokenCache.cs +++ b/src/OpenIddict.Core/Caches/OpenIddictTokenCache.cs @@ -17,7 +17,7 @@ namespace OpenIddict.Core; /// Provides methods allowing to cache tokens after retrieving them from the store. /// /// The type of the Token entity. -public class OpenIddictTokenCache : IOpenIddictTokenCache, IDisposable where TToken : class +public sealed class OpenIddictTokenCache : IOpenIddictTokenCache, IDisposable where TToken : class { private readonly MemoryCache _cache; private readonly ConcurrentDictionary _signals; @@ -504,7 +504,7 @@ public class OpenIddictTokenCache : IOpenIddictTokenCache, IDisp /// The token to store in the cache entry, if applicable. /// The that can be used to abort the operation. /// A that can be used to monitor the asynchronous operation. - protected virtual async ValueTask CreateEntryAsync(object key, TToken? token, CancellationToken cancellationToken) + private async ValueTask CreateEntryAsync(object key, TToken? token, CancellationToken cancellationToken) { if (key is null) { @@ -530,8 +530,7 @@ public class OpenIddictTokenCache : IOpenIddictTokenCache, IDisp /// The tokens to store in the cache entry. /// The that can be used to abort the operation. /// A that can be used to monitor the asynchronous operation. - protected virtual async ValueTask CreateEntryAsync( - object key, ImmutableArray tokens, CancellationToken cancellationToken) + private async ValueTask CreateEntryAsync(object key, ImmutableArray tokens, CancellationToken cancellationToken) { if (key is null) { @@ -560,7 +559,7 @@ public class OpenIddictTokenCache : IOpenIddictTokenCache, IDisp /// A that can be used to monitor the asynchronous operation, /// whose result returns an expiration signal for the specified token. /// - protected virtual async ValueTask CreateExpirationSignalAsync(TToken token, CancellationToken cancellationToken) + private async ValueTask CreateExpirationSignalAsync(TToken token, CancellationToken cancellationToken) { if (token is null) { diff --git a/src/OpenIddict.Core/OpenIddictCoreBuilder.cs b/src/OpenIddict.Core/OpenIddictCoreBuilder.cs index 1c5aace4..43d475ce 100644 --- a/src/OpenIddict.Core/OpenIddictCoreBuilder.cs +++ b/src/OpenIddict.Core/OpenIddictCoreBuilder.cs @@ -14,7 +14,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// /// Exposes the necessary methods required to configure the OpenIddict core services. /// -public class OpenIddictCoreBuilder +public sealed class OpenIddictCoreBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Core/OpenIddictCoreOptions.cs b/src/OpenIddict.Core/OpenIddictCoreOptions.cs index 65f672e5..0ca19734 100644 --- a/src/OpenIddict.Core/OpenIddictCoreOptions.cs +++ b/src/OpenIddict.Core/OpenIddictCoreOptions.cs @@ -9,7 +9,7 @@ namespace OpenIddict.Core; /// /// Provides various settings needed to configure the OpenIddict core services. /// -public class OpenIddictCoreOptions +public sealed class OpenIddictCoreOptions { /// /// Gets or sets the type corresponding to the default Application entity, diff --git a/src/OpenIddict.Core/Resolvers/OpenIddictApplicationStoreResolver.cs b/src/OpenIddict.Core/Resolvers/OpenIddictApplicationStoreResolver.cs index cbd36b4b..56168b1e 100644 --- a/src/OpenIddict.Core/Resolvers/OpenIddictApplicationStoreResolver.cs +++ b/src/OpenIddict.Core/Resolvers/OpenIddictApplicationStoreResolver.cs @@ -5,7 +5,7 @@ namespace OpenIddict.Core; /// /// Exposes a method allowing to resolve an application store. /// -public class OpenIddictApplicationStoreResolver : IOpenIddictApplicationStoreResolver +public sealed class OpenIddictApplicationStoreResolver : IOpenIddictApplicationStoreResolver { private readonly IServiceProvider _provider; diff --git a/src/OpenIddict.Core/Resolvers/OpenIddictAuthorizationStoreResolver.cs b/src/OpenIddict.Core/Resolvers/OpenIddictAuthorizationStoreResolver.cs index 5c91a048..c38f03cc 100644 --- a/src/OpenIddict.Core/Resolvers/OpenIddictAuthorizationStoreResolver.cs +++ b/src/OpenIddict.Core/Resolvers/OpenIddictAuthorizationStoreResolver.cs @@ -5,7 +5,7 @@ namespace OpenIddict.Core; /// /// Exposes a method allowing to resolve an authorization store. /// -public class OpenIddictAuthorizationStoreResolver : IOpenIddictAuthorizationStoreResolver +public sealed class OpenIddictAuthorizationStoreResolver : IOpenIddictAuthorizationStoreResolver { private readonly IServiceProvider _provider; diff --git a/src/OpenIddict.Core/Resolvers/OpenIddictScopeStoreResolver.cs b/src/OpenIddict.Core/Resolvers/OpenIddictScopeStoreResolver.cs index 297622ca..8b583e52 100644 --- a/src/OpenIddict.Core/Resolvers/OpenIddictScopeStoreResolver.cs +++ b/src/OpenIddict.Core/Resolvers/OpenIddictScopeStoreResolver.cs @@ -5,7 +5,7 @@ namespace OpenIddict.Core; /// /// Exposes a method allowing to resolve a scope store. /// -public class OpenIddictScopeStoreResolver : IOpenIddictScopeStoreResolver +public sealed class OpenIddictScopeStoreResolver : IOpenIddictScopeStoreResolver { private readonly IServiceProvider _provider; diff --git a/src/OpenIddict.Core/Resolvers/OpenIddictTokenStoreResolver.cs b/src/OpenIddict.Core/Resolvers/OpenIddictTokenStoreResolver.cs index 7292d6d5..c0580275 100644 --- a/src/OpenIddict.Core/Resolvers/OpenIddictTokenStoreResolver.cs +++ b/src/OpenIddict.Core/Resolvers/OpenIddictTokenStoreResolver.cs @@ -5,7 +5,7 @@ namespace OpenIddict.Core; /// /// Exposes a method allowing to resolve a token store. /// -public class OpenIddictTokenStoreResolver : IOpenIddictTokenStoreResolver +public sealed class OpenIddictTokenStoreResolver : IOpenIddictTokenStoreResolver { private readonly IServiceProvider _provider; diff --git a/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkApplicationConfiguration.cs b/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkApplicationConfiguration.cs index 8895f712..66f32a1b 100644 --- a/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkApplicationConfiguration.cs +++ b/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkApplicationConfiguration.cs @@ -20,7 +20,7 @@ namespace OpenIddict.EntityFramework; /// The type of the Token entity. /// The type of the Key entity. [EditorBrowsable(EditorBrowsableState.Never)] -public class OpenIddictEntityFrameworkApplicationConfiguration : EntityTypeConfiguration +public sealed class OpenIddictEntityFrameworkApplicationConfiguration : EntityTypeConfiguration where TApplication : OpenIddictEntityFrameworkApplication where TAuthorization : OpenIddictEntityFrameworkAuthorization where TToken : OpenIddictEntityFrameworkToken diff --git a/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkAuthorizationConfiguration.cs b/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkAuthorizationConfiguration.cs index 2da8be0d..ebe78785 100644 --- a/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkAuthorizationConfiguration.cs +++ b/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkAuthorizationConfiguration.cs @@ -18,7 +18,7 @@ namespace OpenIddict.EntityFramework; /// The type of the Token entity. /// The type of the Key entity. [EditorBrowsable(EditorBrowsableState.Never)] -public class OpenIddictEntityFrameworkAuthorizationConfiguration : EntityTypeConfiguration +public sealed class OpenIddictEntityFrameworkAuthorizationConfiguration : EntityTypeConfiguration where TAuthorization : OpenIddictEntityFrameworkAuthorization where TApplication : OpenIddictEntityFrameworkApplication where TToken : OpenIddictEntityFrameworkToken diff --git a/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkScopeConfiguration.cs b/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkScopeConfiguration.cs index 3b978280..b41fd838 100644 --- a/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkScopeConfiguration.cs +++ b/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkScopeConfiguration.cs @@ -18,7 +18,7 @@ namespace OpenIddict.EntityFramework; /// The type of the Scope entity. /// The type of the Key entity. [EditorBrowsable(EditorBrowsableState.Never)] -public class OpenIddictEntityFrameworkScopeConfiguration : EntityTypeConfiguration +public sealed class OpenIddictEntityFrameworkScopeConfiguration : EntityTypeConfiguration where TScope : OpenIddictEntityFrameworkScope where TKey : notnull, IEquatable { diff --git a/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkTokenConfiguration.cs b/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkTokenConfiguration.cs index d0226742..79de8473 100644 --- a/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkTokenConfiguration.cs +++ b/src/OpenIddict.EntityFramework/Configurations/OpenIddictEntityFrameworkTokenConfiguration.cs @@ -20,7 +20,7 @@ namespace OpenIddict.EntityFramework; /// The type of the Authorization entity. /// The type of the Key entity. [EditorBrowsable(EditorBrowsableState.Never)] -public class OpenIddictEntityFrameworkTokenConfiguration : EntityTypeConfiguration +public sealed class OpenIddictEntityFrameworkTokenConfiguration : EntityTypeConfiguration where TToken : OpenIddictEntityFrameworkToken where TApplication : OpenIddictEntityFrameworkApplication where TAuthorization : OpenIddictEntityFrameworkAuthorization diff --git a/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkBuilder.cs b/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkBuilder.cs index ce8cc7fe..fbdcd6c6 100644 --- a/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkBuilder.cs +++ b/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkBuilder.cs @@ -15,7 +15,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// /// Exposes the necessary methods required to configure the OpenIddict Entity Framework 6.x services. /// -public class OpenIddictEntityFrameworkBuilder +public sealed class OpenIddictEntityFrameworkBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkOptions.cs b/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkOptions.cs index bff7be86..85aa87b0 100644 --- a/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkOptions.cs +++ b/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkOptions.cs @@ -10,7 +10,7 @@ namespace OpenIddict.EntityFramework; /// Provides various settings needed to configure /// the OpenIddict Entity Framework 6.x integration. /// -public class OpenIddictEntityFrameworkOptions +public sealed class OpenIddictEntityFrameworkOptions { /// /// Gets or sets the concrete type of the used by the diff --git a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkApplicationStoreResolver.cs b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkApplicationStoreResolver.cs index 380accac..468283e5 100644 --- a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkApplicationStoreResolver.cs +++ b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkApplicationStoreResolver.cs @@ -15,7 +15,7 @@ namespace OpenIddict.EntityFramework; /// /// Exposes a method allowing to resolve an application store. /// -public class OpenIddictEntityFrameworkApplicationStoreResolver : IOpenIddictApplicationStoreResolver +public sealed class OpenIddictEntityFrameworkApplicationStoreResolver : IOpenIddictApplicationStoreResolver { private readonly TypeResolutionCache _cache; private readonly IOptionsMonitor _options; @@ -68,5 +68,5 @@ public class OpenIddictEntityFrameworkApplicationStoreResolver : IOpenIddictAppl // service provider must be able to resolve scoped services (typically, the store they return). // To avoid having to declare a static type resolution cache, a special cache service is used // here and registered as a singleton dependency so that its content persists beyond the scope. - public class TypeResolutionCache : ConcurrentDictionary { } + public sealed class TypeResolutionCache : ConcurrentDictionary { } } diff --git a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkAuthorizationStoreResolver.cs b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkAuthorizationStoreResolver.cs index e5fef634..3be9ba8b 100644 --- a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkAuthorizationStoreResolver.cs +++ b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkAuthorizationStoreResolver.cs @@ -15,7 +15,7 @@ namespace OpenIddict.EntityFramework; /// /// Exposes a method allowing to resolve an authorization store. /// -public class OpenIddictEntityFrameworkAuthorizationStoreResolver : IOpenIddictAuthorizationStoreResolver +public sealed class OpenIddictEntityFrameworkAuthorizationStoreResolver : IOpenIddictAuthorizationStoreResolver { private readonly TypeResolutionCache _cache; private readonly IOptionsMonitor _options; @@ -68,5 +68,5 @@ public class OpenIddictEntityFrameworkAuthorizationStoreResolver : IOpenIddictAu // service provider must be able to resolve scoped services (typically, the store they return). // To avoid having to declare a static type resolution cache, a special cache service is used // here and registered as a singleton dependency so that its content persists beyond the scope. - public class TypeResolutionCache : ConcurrentDictionary { } + public sealed class TypeResolutionCache : ConcurrentDictionary { } } diff --git a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkScopeStoreResolver.cs b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkScopeStoreResolver.cs index b71ab3bd..d3c9b07f 100644 --- a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkScopeStoreResolver.cs +++ b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkScopeStoreResolver.cs @@ -15,7 +15,7 @@ namespace OpenIddict.EntityFramework; /// /// Exposes a method allowing to resolve a scope store. /// -public class OpenIddictEntityFrameworkScopeStoreResolver : IOpenIddictScopeStoreResolver +public sealed class OpenIddictEntityFrameworkScopeStoreResolver : IOpenIddictScopeStoreResolver { private readonly TypeResolutionCache _cache; private readonly IOptionsMonitor _options; @@ -66,5 +66,5 @@ public class OpenIddictEntityFrameworkScopeStoreResolver : IOpenIddictScopeStore // service provider must be able to resolve scoped services (typically, the store they return). // To avoid having to declare a static type resolution cache, a special cache service is used // here and registered as a singleton dependency so that its content persists beyond the scope. - public class TypeResolutionCache : ConcurrentDictionary { } + public sealed class TypeResolutionCache : ConcurrentDictionary { } } diff --git a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkTokenStoreResolver.cs b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkTokenStoreResolver.cs index 1badfcd4..33841545 100644 --- a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkTokenStoreResolver.cs +++ b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkTokenStoreResolver.cs @@ -15,7 +15,7 @@ namespace OpenIddict.EntityFramework; /// /// Exposes a method allowing to resolve a token store. /// -public class OpenIddictEntityFrameworkTokenStoreResolver : IOpenIddictTokenStoreResolver +public sealed class OpenIddictEntityFrameworkTokenStoreResolver : IOpenIddictTokenStoreResolver { private readonly TypeResolutionCache _cache; private readonly IOptionsMonitor _options; @@ -68,5 +68,5 @@ public class OpenIddictEntityFrameworkTokenStoreResolver : IOpenIddictTokenStore // service provider must be able to resolve scoped services (typically, the store they return). // To avoid having to declare a static type resolution cache, a special cache service is used // here and registered as a singleton dependency so that its content persists beyond the scope. - public class TypeResolutionCache : ConcurrentDictionary { } + public sealed class TypeResolutionCache : ConcurrentDictionary { } } diff --git a/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreApplicationConfiguration.cs b/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreApplicationConfiguration.cs index 140bb402..9600f4b1 100644 --- a/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreApplicationConfiguration.cs +++ b/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreApplicationConfiguration.cs @@ -18,7 +18,7 @@ namespace OpenIddict.EntityFrameworkCore; /// The type of the Token entity. /// The type of the Key entity. [EditorBrowsable(EditorBrowsableState.Never)] -public class OpenIddictEntityFrameworkCoreApplicationConfiguration : IEntityTypeConfiguration +public sealed class OpenIddictEntityFrameworkCoreApplicationConfiguration : IEntityTypeConfiguration where TApplication : OpenIddictEntityFrameworkCoreApplication where TAuthorization : OpenIddictEntityFrameworkCoreAuthorization where TToken : OpenIddictEntityFrameworkCoreToken diff --git a/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreAuthorizationConfiguration.cs b/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreAuthorizationConfiguration.cs index 2ce61897..53a0812a 100644 --- a/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreAuthorizationConfiguration.cs +++ b/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreAuthorizationConfiguration.cs @@ -18,7 +18,7 @@ namespace OpenIddict.EntityFrameworkCore; /// The type of the Token entity. /// The type of the Key entity. [EditorBrowsable(EditorBrowsableState.Never)] -public class OpenIddictEntityFrameworkCoreAuthorizationConfiguration : IEntityTypeConfiguration +public sealed class OpenIddictEntityFrameworkCoreAuthorizationConfiguration : IEntityTypeConfiguration where TAuthorization : OpenIddictEntityFrameworkCoreAuthorization where TApplication : OpenIddictEntityFrameworkCoreApplication where TToken : OpenIddictEntityFrameworkCoreToken diff --git a/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreScopeConfiguration.cs b/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreScopeConfiguration.cs index 828623d3..df492321 100644 --- a/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreScopeConfiguration.cs +++ b/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreScopeConfiguration.cs @@ -16,7 +16,7 @@ namespace OpenIddict.EntityFrameworkCore; /// The type of the Scope entity. /// The type of the Key entity. [EditorBrowsable(EditorBrowsableState.Never)] -public class OpenIddictEntityFrameworkCoreScopeConfiguration : IEntityTypeConfiguration +public sealed class OpenIddictEntityFrameworkCoreScopeConfiguration : IEntityTypeConfiguration where TScope : OpenIddictEntityFrameworkCoreScope where TKey : notnull, IEquatable { diff --git a/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreTokenConfiguration.cs b/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreTokenConfiguration.cs index bafb2138..92f135cc 100644 --- a/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreTokenConfiguration.cs +++ b/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictEntityFrameworkCoreTokenConfiguration.cs @@ -18,7 +18,7 @@ namespace OpenIddict.EntityFrameworkCore; /// The type of the Authorization entity. /// The type of the Key entity. [EditorBrowsable(EditorBrowsableState.Never)] -public class OpenIddictEntityFrameworkCoreTokenConfiguration : IEntityTypeConfiguration +public sealed class OpenIddictEntityFrameworkCoreTokenConfiguration : IEntityTypeConfiguration where TToken : OpenIddictEntityFrameworkCoreToken where TApplication : OpenIddictEntityFrameworkCoreApplication where TAuthorization : OpenIddictEntityFrameworkCoreAuthorization diff --git a/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreBuilder.cs b/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreBuilder.cs index c79d52ac..ed741dcc 100644 --- a/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreBuilder.cs +++ b/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreBuilder.cs @@ -14,7 +14,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// /// Exposes the necessary methods required to configure the OpenIddict Entity Framework Core services. /// -public class OpenIddictEntityFrameworkCoreBuilder +public sealed class OpenIddictEntityFrameworkCoreBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreCustomizer.cs b/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreCustomizer.cs index 7413d67f..c61f25b8 100644 --- a/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreCustomizer.cs +++ b/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreCustomizer.cs @@ -12,7 +12,7 @@ namespace OpenIddict.EntityFrameworkCore; /// Represents a model customizer able to register the entity sets /// required by the OpenIddict stack in an Entity Framework Core context. /// -public class OpenIddictEntityFrameworkCoreCustomizer : RelationalModelCustomizer +public sealed class OpenIddictEntityFrameworkCoreCustomizer : RelationalModelCustomizer where TApplication : OpenIddictEntityFrameworkCoreApplication where TAuthorization : OpenIddictEntityFrameworkCoreAuthorization where TScope : OpenIddictEntityFrameworkCoreScope diff --git a/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreOptions.cs b/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreOptions.cs index 362482be..7bcdbef6 100644 --- a/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreOptions.cs +++ b/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreOptions.cs @@ -10,7 +10,7 @@ namespace OpenIddict.EntityFrameworkCore; /// Provides various settings needed to configure /// the OpenIddict Entity Framework Core integration. /// -public class OpenIddictEntityFrameworkCoreOptions +public sealed class OpenIddictEntityFrameworkCoreOptions { /// /// Gets or sets the concrete type of the used by the diff --git a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreApplicationStoreResolver.cs b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreApplicationStoreResolver.cs index 2431acda..fd9db8c6 100644 --- a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreApplicationStoreResolver.cs +++ b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreApplicationStoreResolver.cs @@ -15,7 +15,7 @@ namespace OpenIddict.EntityFrameworkCore; /// /// Exposes a method allowing to resolve an application store. /// -public class OpenIddictEntityFrameworkCoreApplicationStoreResolver : IOpenIddictApplicationStoreResolver +public sealed class OpenIddictEntityFrameworkCoreApplicationStoreResolver : IOpenIddictApplicationStoreResolver { private readonly TypeResolutionCache _cache; private readonly IOptionsMonitor _options; @@ -68,5 +68,5 @@ public class OpenIddictEntityFrameworkCoreApplicationStoreResolver : IOpenIddict // service provider must be able to resolve scoped services (typically, the store they return). // To avoid having to declare a static type resolution cache, a special cache service is used // here and registered as a singleton dependency so that its content persists beyond the scope. - public class TypeResolutionCache : ConcurrentDictionary { } + public sealed class TypeResolutionCache : ConcurrentDictionary { } } diff --git a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreAuthorizationStoreResolver.cs b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreAuthorizationStoreResolver.cs index d6db96fd..70a33a37 100644 --- a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreAuthorizationStoreResolver.cs +++ b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreAuthorizationStoreResolver.cs @@ -15,7 +15,7 @@ namespace OpenIddict.EntityFrameworkCore; /// /// Exposes a method allowing to resolve an authorization store. /// -public class OpenIddictEntityFrameworkCoreAuthorizationStoreResolver : IOpenIddictAuthorizationStoreResolver +public sealed class OpenIddictEntityFrameworkCoreAuthorizationStoreResolver : IOpenIddictAuthorizationStoreResolver { private readonly TypeResolutionCache _cache; private readonly IOptionsMonitor _options; @@ -68,5 +68,5 @@ public class OpenIddictEntityFrameworkCoreAuthorizationStoreResolver : IOpenIddi // service provider must be able to resolve scoped services (typically, the store they return). // To avoid having to declare a static type resolution cache, a special cache service is used // here and registered as a singleton dependency so that its content persists beyond the scope. - public class TypeResolutionCache : ConcurrentDictionary { } + public sealed class TypeResolutionCache : ConcurrentDictionary { } } diff --git a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreScopeStoreResolver.cs b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreScopeStoreResolver.cs index 13e61f93..c593f12f 100644 --- a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreScopeStoreResolver.cs +++ b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreScopeStoreResolver.cs @@ -15,7 +15,7 @@ namespace OpenIddict.EntityFrameworkCore; /// /// Exposes a method allowing to resolve a scope store. /// -public class OpenIddictEntityFrameworkCoreScopeStoreResolver : IOpenIddictScopeStoreResolver +public sealed class OpenIddictEntityFrameworkCoreScopeStoreResolver : IOpenIddictScopeStoreResolver { private readonly TypeResolutionCache _cache; private readonly IOptionsMonitor _options; @@ -66,5 +66,5 @@ public class OpenIddictEntityFrameworkCoreScopeStoreResolver : IOpenIddictScopeS // service provider must be able to resolve scoped services (typically, the store they return). // To avoid having to declare a static type resolution cache, a special cache service is used // here and registered as a singleton dependency so that its content persists beyond the scope. - public class TypeResolutionCache : ConcurrentDictionary { } + public sealed class TypeResolutionCache : ConcurrentDictionary { } } diff --git a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreTokenStoreResolver.cs b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreTokenStoreResolver.cs index 6c924cfe..acfe6986 100644 --- a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreTokenStoreResolver.cs +++ b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreTokenStoreResolver.cs @@ -15,7 +15,7 @@ namespace OpenIddict.EntityFrameworkCore; /// /// Exposes a method allowing to resolve a token store. /// -public class OpenIddictEntityFrameworkCoreTokenStoreResolver : IOpenIddictTokenStoreResolver +public sealed class OpenIddictEntityFrameworkCoreTokenStoreResolver : IOpenIddictTokenStoreResolver { private readonly TypeResolutionCache _cache; private readonly IOptionsMonitor _options; @@ -68,5 +68,5 @@ public class OpenIddictEntityFrameworkCoreTokenStoreResolver : IOpenIddictTokenS // service provider must be able to resolve scoped services (typically, the store they return). // To avoid having to declare a static type resolution cache, a special cache service is used // here and registered as a singleton dependency so that its content persists beyond the scope. - public class TypeResolutionCache : ConcurrentDictionary { } + public sealed class TypeResolutionCache : ConcurrentDictionary { } } diff --git a/src/OpenIddict.MongoDb/OpenIddictMongoDbBuilder.cs b/src/OpenIddict.MongoDb/OpenIddictMongoDbBuilder.cs index 462fa0ca..497e2f6d 100644 --- a/src/OpenIddict.MongoDb/OpenIddictMongoDbBuilder.cs +++ b/src/OpenIddict.MongoDb/OpenIddictMongoDbBuilder.cs @@ -14,7 +14,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// /// Exposes the necessary methods required to configure the OpenIddict MongoDB services. /// -public class OpenIddictMongoDbBuilder +public sealed class OpenIddictMongoDbBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.MongoDb/OpenIddictMongoDbContext.cs b/src/OpenIddict.MongoDb/OpenIddictMongoDbContext.cs index 35b10d9a..8e45c53c 100644 --- a/src/OpenIddict.MongoDb/OpenIddictMongoDbContext.cs +++ b/src/OpenIddict.MongoDb/OpenIddictMongoDbContext.cs @@ -10,7 +10,7 @@ using Microsoft.Extensions.Options; namespace OpenIddict.MongoDb; /// -public class OpenIddictMongoDbContext : IOpenIddictMongoDbContext +public sealed class OpenIddictMongoDbContext : IOpenIddictMongoDbContext { private readonly IOptionsMonitor _options; private readonly IServiceProvider _provider; diff --git a/src/OpenIddict.MongoDb/OpenIddictMongoDbOptions.cs b/src/OpenIddict.MongoDb/OpenIddictMongoDbOptions.cs index 83af457f..9efd53ec 100644 --- a/src/OpenIddict.MongoDb/OpenIddictMongoDbOptions.cs +++ b/src/OpenIddict.MongoDb/OpenIddictMongoDbOptions.cs @@ -9,7 +9,7 @@ namespace OpenIddict.MongoDb; /// /// Provides various settings needed to configure the OpenIddict MongoDB integration. /// -public class OpenIddictMongoDbOptions +public sealed class OpenIddictMongoDbOptions { /// /// Gets or sets the name of the applications collection (by default, openiddict.applications). diff --git a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbApplicationStoreResolver.cs b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbApplicationStoreResolver.cs index 294f1c99..689b39cd 100644 --- a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbApplicationStoreResolver.cs +++ b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbApplicationStoreResolver.cs @@ -13,7 +13,7 @@ namespace OpenIddict.MongoDb; /// /// Exposes a method allowing to resolve an application store. /// -public class OpenIddictMongoDbApplicationStoreResolver : IOpenIddictApplicationStoreResolver +public sealed class OpenIddictMongoDbApplicationStoreResolver : IOpenIddictApplicationStoreResolver { private readonly ConcurrentDictionary _cache = new ConcurrentDictionary(); private readonly IServiceProvider _provider; diff --git a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbAuthorizationStoreResolver.cs b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbAuthorizationStoreResolver.cs index 2ed07560..fa6d7430 100644 --- a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbAuthorizationStoreResolver.cs +++ b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbAuthorizationStoreResolver.cs @@ -13,7 +13,7 @@ namespace OpenIddict.MongoDb; /// /// Exposes a method allowing to resolve an authorization store. /// -public class OpenIddictMongoDbAuthorizationStoreResolver : IOpenIddictAuthorizationStoreResolver +public sealed class OpenIddictMongoDbAuthorizationStoreResolver : IOpenIddictAuthorizationStoreResolver { private readonly ConcurrentDictionary _cache = new ConcurrentDictionary(); private readonly IServiceProvider _provider; diff --git a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbScopeStoreResolver.cs b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbScopeStoreResolver.cs index b7490090..990df738 100644 --- a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbScopeStoreResolver.cs +++ b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbScopeStoreResolver.cs @@ -13,7 +13,7 @@ namespace OpenIddict.MongoDb; /// /// Exposes a method allowing to resolve a scope store. /// -public class OpenIddictMongoDbScopeStoreResolver : IOpenIddictScopeStoreResolver +public sealed class OpenIddictMongoDbScopeStoreResolver : IOpenIddictScopeStoreResolver { private readonly ConcurrentDictionary _cache = new ConcurrentDictionary(); private readonly IServiceProvider _provider; diff --git a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbTokenStoreResolver.cs b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbTokenStoreResolver.cs index 8230915e..b7ce4604 100644 --- a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbTokenStoreResolver.cs +++ b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbTokenStoreResolver.cs @@ -13,7 +13,7 @@ namespace OpenIddict.MongoDb; /// /// Exposes a method allowing to resolve a token store. /// -public class OpenIddictMongoDbTokenStoreResolver : IOpenIddictTokenStoreResolver +public sealed class OpenIddictMongoDbTokenStoreResolver : IOpenIddictTokenStoreResolver { private readonly ConcurrentDictionary _cache = new ConcurrentDictionary(); private readonly IServiceProvider _provider; diff --git a/src/OpenIddict.Quartz/OpenIddictQuartzBuilder.cs b/src/OpenIddict.Quartz/OpenIddictQuartzBuilder.cs index 390c0fbe..67b76586 100644 --- a/src/OpenIddict.Quartz/OpenIddictQuartzBuilder.cs +++ b/src/OpenIddict.Quartz/OpenIddictQuartzBuilder.cs @@ -12,7 +12,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// /// Exposes the necessary methods required to configure the OpenIddict Quartz.NET integration. /// -public class OpenIddictQuartzBuilder +public sealed class OpenIddictQuartzBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Quartz/OpenIddictQuartzConfiguration.cs b/src/OpenIddict.Quartz/OpenIddictQuartzConfiguration.cs index f4bb8021..bf0e6182 100644 --- a/src/OpenIddict.Quartz/OpenIddictQuartzConfiguration.cs +++ b/src/OpenIddict.Quartz/OpenIddictQuartzConfiguration.cs @@ -11,7 +11,7 @@ namespace OpenIddict.Quartz; /// /// Contains the methods required to ensure that the OpenIddict Quartz.NET configuration is valid. /// -public class OpenIddictQuartzConfiguration : IConfigureOptions +public sealed class OpenIddictQuartzConfiguration : IConfigureOptions { /// public void Configure(QuartzOptions options) diff --git a/src/OpenIddict.Quartz/OpenIddictQuartzJob.cs b/src/OpenIddict.Quartz/OpenIddictQuartzJob.cs index 26536d6a..2d09db1b 100644 --- a/src/OpenIddict.Quartz/OpenIddictQuartzJob.cs +++ b/src/OpenIddict.Quartz/OpenIddictQuartzJob.cs @@ -13,7 +13,7 @@ namespace OpenIddict.Quartz; /// Represents a Quartz.NET job performing scheduled tasks for OpenIddict. /// [DisallowConcurrentExecution] -public class OpenIddictQuartzJob : IJob +public sealed class OpenIddictQuartzJob : IJob { private readonly IOptionsMonitor _options; private readonly IServiceProvider _provider; diff --git a/src/OpenIddict.Quartz/OpenIddictQuartzOptions.cs b/src/OpenIddict.Quartz/OpenIddictQuartzOptions.cs index 9d4c5df4..e8f0021b 100644 --- a/src/OpenIddict.Quartz/OpenIddictQuartzOptions.cs +++ b/src/OpenIddict.Quartz/OpenIddictQuartzOptions.cs @@ -9,7 +9,7 @@ namespace OpenIddict.Quartz; /// /// Provides various settings needed to configure the OpenIddict Quartz.NET integration. /// -public class OpenIddictQuartzOptions +public sealed class OpenIddictQuartzOptions { /// /// Gets or sets a boolean indicating whether authorizations pruning should be disabled. diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreBuilder.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreBuilder.cs index 5c63943b..a2f6a815 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreBuilder.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreBuilder.cs @@ -15,7 +15,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// Exposes the necessary methods required to configure /// the OpenIddict server ASP.NET Core integration. /// -public class OpenIddictServerAspNetCoreBuilder +public sealed class OpenIddictServerAspNetCoreBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreConfiguration.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreConfiguration.cs index 66ddb28e..e12934ce 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreConfiguration.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreConfiguration.cs @@ -11,10 +11,10 @@ namespace OpenIddict.Server.AspNetCore; /// /// Contains the methods required to ensure that the OpenIddict server configuration is valid. /// -public class OpenIddictServerAspNetCoreConfiguration : IConfigureOptions, - IConfigureOptions, - IPostConfigureOptions, - IPostConfigureOptions +public sealed class OpenIddictServerAspNetCoreConfiguration : IConfigureOptions, + IConfigureOptions, + IPostConfigureOptions, + IPostConfigureOptions { /// /// Registers the OpenIddict server handler in the global authentication options. diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreFeature.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreFeature.cs index 46c3db41..ef4eebb4 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreFeature.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreFeature.cs @@ -9,7 +9,7 @@ namespace OpenIddict.Server.AspNetCore; /// /// Exposes the current server transaction to the ASP.NET Core host. /// -public class OpenIddictServerAspNetCoreFeature +public sealed class OpenIddictServerAspNetCoreFeature { /// /// Gets or sets the server transaction that encapsulates all specific diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandler.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandler.cs index 93653b2c..df16d52c 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandler.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandler.cs @@ -17,7 +17,7 @@ namespace OpenIddict.Server.AspNetCore; /// /// Provides the logic necessary to extract, validate and handle OpenID Connect requests. /// -public class OpenIddictServerAspNetCoreHandler : AuthenticationHandler, +public sealed class OpenIddictServerAspNetCoreHandler : AuthenticationHandler, IAuthenticationRequestHandler, IAuthenticationSignInHandler, IAuthenticationSignOutHandler diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlerFilters.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlerFilters.cs index 9a29dd83..4934091f 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlerFilters.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlerFilters.cs @@ -19,7 +19,7 @@ public static class OpenIddictServerAspNetCoreHandlerFilters /// /// Represents a filter that excludes the associated handlers if authorization request caching was not enabled. /// - public class RequireAuthorizationRequestCachingEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireAuthorizationRequestCachingEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -41,7 +41,7 @@ public static class OpenIddictServerAspNetCoreHandlerFilters /// Represents a filter that excludes the associated handlers if the /// pass-through mode was not enabled for the authorization endpoint. /// - public class RequireAuthorizationEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireAuthorizationEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -62,7 +62,7 @@ public static class OpenIddictServerAspNetCoreHandlerFilters /// /// Represents a filter that excludes the associated handlers if error pass-through was not enabled. /// - public class RequireErrorPassthroughEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireErrorPassthroughEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -83,7 +83,7 @@ public static class OpenIddictServerAspNetCoreHandlerFilters /// /// Represents a filter that excludes the associated handlers if no ASP.NET Core request can be found. /// - public class RequireHttpRequest : IOpenIddictServerHandlerFilter + public sealed class RequireHttpRequest : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -99,7 +99,7 @@ public static class OpenIddictServerAspNetCoreHandlerFilters /// /// Represents a filter that excludes the associated handlers if logout request caching was not enabled. /// - public class RequireLogoutRequestCachingEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireLogoutRequestCachingEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -121,7 +121,7 @@ public static class OpenIddictServerAspNetCoreHandlerFilters /// Represents a filter that excludes the associated handlers if the /// pass-through mode was not enabled for the logout endpoint. /// - public class RequireLogoutEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireLogoutEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -142,7 +142,7 @@ public static class OpenIddictServerAspNetCoreHandlerFilters /// /// Represents a filter that excludes the associated handlers if status code pages support was not enabled. /// - public class RequireStatusCodePagesIntegrationEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireStatusCodePagesIntegrationEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -163,7 +163,7 @@ public static class OpenIddictServerAspNetCoreHandlerFilters /// /// Represents a filter that excludes the associated handlers if the HTTPS requirement was disabled. /// - public class RequireTransportSecurityRequirementEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireTransportSecurityRequirementEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -185,7 +185,7 @@ public static class OpenIddictServerAspNetCoreHandlerFilters /// Represents a filter that excludes the associated handlers if the /// pass-through mode was not enabled for the authorization endpoint. /// - public class RequireTokenEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireTokenEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -207,7 +207,7 @@ public static class OpenIddictServerAspNetCoreHandlerFilters /// Represents a filter that excludes the associated handlers if the /// pass-through mode was not enabled for the userinfo endpoint. /// - public class RequireUserinfoEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireUserinfoEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -229,7 +229,7 @@ public static class OpenIddictServerAspNetCoreHandlerFilters /// Represents a filter that excludes the associated handlers if the /// pass-through mode was not enabled for the verification endpoint. /// - public class RequireVerificationEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireVerificationEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Authentication.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Authentication.cs index 94b786f9..74b4c0c4 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Authentication.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Authentication.cs @@ -58,7 +58,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// 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. /// - public class RestoreCachedRequestParameters : IOpenIddictServerHandler + public sealed class RestoreCachedRequestParameters : IOpenIddictServerHandler { private readonly IDistributedCache _cache; @@ -152,7 +152,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// 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. /// - public class CacheRequestParameters : IOpenIddictServerHandler + public sealed class CacheRequestParameters : IOpenIddictServerHandler { private readonly IDistributedCache _cache; private readonly IOptionsMonitor _options; @@ -261,7 +261,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// 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. /// - public class RemoveCachedRequest : IOpenIddictServerHandler + public sealed class RemoveCachedRequest : IOpenIddictServerHandler { private readonly IDistributedCache _cache; @@ -309,7 +309,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for processing authorization responses using the form_post response mode. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessFormPostResponse : IOpenIddictServerHandler + public sealed class ProcessFormPostResponse : IOpenIddictServerHandler { private readonly HtmlEncoder _encoder; @@ -400,7 +400,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for processing authorization responses using the query response mode. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessQueryResponse : IOpenIddictServerHandler + public sealed class ProcessQueryResponse : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -471,7 +471,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for processing authorization responses using the fragment response mode. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessFragmentResponse : IOpenIddictServerHandler + public sealed class ProcessFragmentResponse : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Device.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Device.cs index afd9d7c3..70c73781 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Device.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Device.cs @@ -55,7 +55,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for processing verification responses that should trigger a host redirection. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessHostRedirectionResponse : IOpenIddictServerHandler + public sealed class ProcessHostRedirectionResponse : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Session.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Session.cs index 3cafecf7..886546b4 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Session.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Session.cs @@ -55,7 +55,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// 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. /// - public class RestoreCachedRequestParameters : IOpenIddictServerHandler + public sealed class RestoreCachedRequestParameters : IOpenIddictServerHandler { private readonly IDistributedCache _cache; @@ -149,7 +149,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for caching logout requests, if applicable. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class CacheRequestParameters : IOpenIddictServerHandler + public sealed class CacheRequestParameters : IOpenIddictServerHandler { private readonly IDistributedCache _cache; private readonly IOptionsMonitor _options; @@ -258,7 +258,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for removing cached logout requests from the distributed cache. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class RemoveCachedRequest : IOpenIddictServerHandler + public sealed class RemoveCachedRequest : IOpenIddictServerHandler { private readonly IDistributedCache _cache; @@ -306,7 +306,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for processing logout responses. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessQueryResponse : IOpenIddictServerHandler + public sealed class ProcessQueryResponse : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -376,7 +376,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for processing logout responses that should trigger a host redirection. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessHostRedirectionResponse : IOpenIddictServerHandler + public sealed class ProcessHostRedirectionResponse : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.cs index 0e7d00c7..7b874ad2 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.cs @@ -62,7 +62,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for inferring the endpoint type from the request address. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class InferEndpointType : IOpenIddictServerHandler + public sealed class InferEndpointType : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -165,7 +165,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for infering the issuer URL from the HTTP request host and validating it. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class InferIssuerFromHost : IOpenIddictServerHandler + public sealed class InferIssuerFromHost : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -229,7 +229,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for rejecting OpenID Connect requests that don't use transport security. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ValidateTransportSecurityRequirement : IOpenIddictServerHandler + public sealed class ValidateTransportSecurityRequirement : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -282,7 +282,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// ASP.NET Core authentication properties specified by the application that triggered the challenge operation. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ResolveHostChallengeProperties : IOpenIddictServerHandler + public sealed class ResolveHostChallengeProperties : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -342,7 +342,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for attaching the error details using the ASP.NET Core authentication properties. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class AttachHostChallengeError : IOpenIddictServerHandler + public sealed class AttachHostChallengeError : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -381,7 +381,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// ASP.NET Core authentication properties specified by the application that triggered the sign-in operation. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ResolveHostSignInProperties : IOpenIddictServerHandler + public sealed class ResolveHostSignInProperties : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -442,7 +442,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// ASP.NET Core authentication properties specified by the application that triggered the sign-out operation. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ResolveHostSignOutProperties : IOpenIddictServerHandler + public sealed class ResolveHostSignOutProperties : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -502,7 +502,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for extracting OpenID Connect requests from GET HTTP requests. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ExtractGetRequest : IOpenIddictServerHandler where TContext : BaseValidatingContext + public sealed class ExtractGetRequest : IOpenIddictServerHandler where TContext : BaseValidatingContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -553,7 +553,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for extracting OpenID Connect requests from GET or POST HTTP requests. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ExtractGetOrPostRequest : IOpenIddictServerHandler where TContext : BaseValidatingContext + public sealed class ExtractGetOrPostRequest : IOpenIddictServerHandler where TContext : BaseValidatingContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -633,7 +633,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for extracting OpenID Connect requests from POST HTTP requests. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ExtractPostRequest : IOpenIddictServerHandler where TContext : BaseValidatingContext + public sealed class ExtractPostRequest : IOpenIddictServerHandler where TContext : BaseValidatingContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -708,7 +708,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for extracting client credentials from the standard HTTP Authorization header. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ExtractBasicAuthenticationCredentials : IOpenIddictServerHandler + public sealed class ExtractBasicAuthenticationCredentials : IOpenIddictServerHandler where TContext : BaseValidatingContext { /// @@ -807,7 +807,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for extracting an access token from the standard HTTP Authorization header. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ExtractAccessToken : IOpenIddictServerHandler + public sealed class ExtractAccessToken : IOpenIddictServerHandler where TContext : BaseValidatingContext { /// @@ -853,7 +853,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for enabling the pass-through mode for the received request. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class EnablePassthroughMode : IOpenIddictServerHandler + public sealed class EnablePassthroughMode : IOpenIddictServerHandler where TContext : BaseRequestContext where TFilter : IOpenIddictServerHandlerFilter { @@ -887,7 +887,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for attaching an appropriate HTTP status code. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class AttachHttpResponseCode : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class AttachHttpResponseCode : IOpenIddictServerHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -949,7 +949,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for attaching the appropriate HTTP response cache headers. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class AttachCacheControlHeader : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class AttachCacheControlHeader : IOpenIddictServerHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -988,7 +988,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for attaching errors details to the WWW-Authenticate header. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class AttachWwwAuthenticateHeader : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class AttachWwwAuthenticateHeader : IOpenIddictServerHandler where TContext : BaseRequestContext { private readonly IOptionsMonitor _options; @@ -1110,7 +1110,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for processing challenge responses that contain a WWW-Authenticate header. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessChallengeErrorResponse : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class ProcessChallengeErrorResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -1153,7 +1153,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for processing OpenID Connect responses that must be returned as JSON. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessJsonResponse : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class ProcessJsonResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -1208,7 +1208,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// middleware in the pipeline at a later stage (e.g an ASP.NET Core MVC action or a NancyFX module). /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessPassthroughErrorResponse : IOpenIddictServerHandler + public sealed class ProcessPassthroughErrorResponse : IOpenIddictServerHandler where TContext : BaseRequestContext where TFilter : IOpenIddictServerHandlerFilter { @@ -1250,7 +1250,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for processing OpenID Connect responses handled by the status code pages middleware. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessStatusCodePagesErrorResponse : IOpenIddictServerHandler + public sealed class ProcessStatusCodePagesErrorResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { /// @@ -1307,7 +1307,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for processing context responses that must be returned as plain-text. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessLocalErrorResponse : IOpenIddictServerHandler + public sealed class ProcessLocalErrorResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { /// @@ -1381,7 +1381,7 @@ public static partial class OpenIddictServerAspNetCoreHandlers /// Contains the logic responsible for processing OpenID Connect responses that don't specify any parameter. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessEmptyResponse : IOpenIddictServerHandler + public sealed class ProcessEmptyResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { /// diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs index fee26534..c1339f96 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs @@ -12,7 +12,7 @@ namespace OpenIddict.Server.AspNetCore; /// /// Provides various settings needed to configure the OpenIddict ASP.NET Core server integration. /// -public class OpenIddictServerAspNetCoreOptions : AuthenticationSchemeOptions +public sealed class OpenIddictServerAspNetCoreOptions : AuthenticationSchemeOptions { /// /// Gets or sets a boolean indicating whether incoming requests arriving on insecure endpoints should be rejected. diff --git a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionBuilder.cs b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionBuilder.cs index 46384629..53bfae55 100644 --- a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionBuilder.cs +++ b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionBuilder.cs @@ -14,7 +14,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// Exposes the necessary methods required to configure the /// OpenIddict ASP.NET Core Data Protection integration. /// -public class OpenIddictServerDataProtectionBuilder +public sealed class OpenIddictServerDataProtectionBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionConfiguration.cs b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionConfiguration.cs index 05c8996d..a885e5f0 100644 --- a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionConfiguration.cs +++ b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionConfiguration.cs @@ -12,8 +12,8 @@ namespace OpenIddict.Server.DataProtection; /// /// Contains the methods required to ensure that the OpenIddict ASP.NET Core Data Protection configuration is valid. /// -public class OpenIddictServerDataProtectionConfiguration : IConfigureOptions, - IPostConfigureOptions +public sealed class OpenIddictServerDataProtectionConfiguration : IConfigureOptions, + IPostConfigureOptions { private readonly IDataProtectionProvider _dataProtectionProvider; diff --git a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionFormatter.cs b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionFormatter.cs index 96ae957a..c1e793c0 100644 --- a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionFormatter.cs +++ b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionFormatter.cs @@ -13,7 +13,7 @@ using Properties = OpenIddict.Server.DataProtection.OpenIddictServerDataProtecti namespace OpenIddict.Server.DataProtection; -public class OpenIddictServerDataProtectionFormatter : IOpenIddictServerDataProtectionFormatter +public sealed class OpenIddictServerDataProtectionFormatter : IOpenIddictServerDataProtectionFormatter { public ClaimsPrincipal ReadToken(BinaryReader reader) { diff --git a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlerFilters.cs b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlerFilters.cs index a67aaa61..ec627106 100644 --- a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlerFilters.cs +++ b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlerFilters.cs @@ -15,7 +15,7 @@ public static class OpenIddictServerDataProtectionHandlerFilters /// Represents a filter that excludes the associated handlers if /// the selected token format is not ASP.NET Core Data Protection. /// - public class RequireDataProtectionTokenFormat : IOpenIddictServerHandlerFilter + public sealed class RequireDataProtectionTokenFormat : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(GenerateTokenContext context) { diff --git a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlers.Protection.cs b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlers.Protection.cs index 4755df32..98ada848 100644 --- a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlers.Protection.cs +++ b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlers.Protection.cs @@ -35,7 +35,7 @@ public static partial class OpenIddictServerDataProtectionHandlers /// /// Contains the logic responsible for validating tokens generated using Data Protection. /// - public class ValidateDataProtectionToken : IOpenIddictServerHandler + public sealed class ValidateDataProtectionToken : IOpenIddictServerHandler { private readonly IOptionsMonitor _options; @@ -243,7 +243,7 @@ public static partial class OpenIddictServerDataProtectionHandlers /// Contains the logic responsible for overriding the default token format /// to generate ASP.NET Core Data Protection tokens instead of JSON Web Tokens. /// - public class OverrideGeneratedTokenFormat : IOpenIddictServerHandler + public sealed class OverrideGeneratedTokenFormat : IOpenIddictServerHandler { private readonly IOptionsMonitor _options; @@ -301,7 +301,7 @@ public static partial class OpenIddictServerDataProtectionHandlers /// /// Contains the logic responsible for generating a token using Data Protection. /// - public class GenerateDataProtectionToken : IOpenIddictServerHandler + public sealed class GenerateDataProtectionToken : IOpenIddictServerHandler { private readonly IOptionsMonitor _options; diff --git a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionOptions.cs b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionOptions.cs index 3dde0b56..027820a1 100644 --- a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionOptions.cs +++ b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionOptions.cs @@ -12,7 +12,7 @@ namespace OpenIddict.Server.DataProtection; /// Provides various settings needed to configure the OpenIddict /// ASP.NET Core Data Protection server integration. /// -public class OpenIddictServerDataProtectionOptions +public sealed class OpenIddictServerDataProtectionOptions { /// /// Gets or sets the data protection provider used to create the default diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinBuilder.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinBuilder.cs index 029ef8ba..763efe57 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinBuilder.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinBuilder.cs @@ -15,7 +15,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// Exposes the necessary methods required to configure /// the OpenIddict server OWIN/Katana integration. /// -public class OpenIddictServerOwinBuilder +public sealed class OpenIddictServerOwinBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinConfiguration.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinConfiguration.cs index f6d28791..d9e9597e 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinConfiguration.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinConfiguration.cs @@ -11,8 +11,8 @@ namespace OpenIddict.Server.Owin; /// /// Contains the methods required to ensure that the OpenIddict server configuration is valid. /// -public class OpenIddictServerOwinConfiguration : IConfigureOptions, - IPostConfigureOptions +public sealed class OpenIddictServerOwinConfiguration : IConfigureOptions, + IPostConfigureOptions { public void Configure(OpenIddictServerOptions options) { diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandler.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandler.cs index 7375862b..f5ca145d 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandler.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandler.cs @@ -15,7 +15,7 @@ namespace OpenIddict.Server.Owin; /// /// Provides the entry point necessary to register the OpenIddict server in an OWIN pipeline. /// -public class OpenIddictServerOwinHandler : AuthenticationHandler +public sealed class OpenIddictServerOwinHandler : AuthenticationHandler { private readonly IOpenIddictServerDispatcher _dispatcher; private readonly IOpenIddictServerFactory _factory; diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlerFilters.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlerFilters.cs index dd3179d3..e2e5cedc 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlerFilters.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlerFilters.cs @@ -17,7 +17,7 @@ public static class OpenIddictServerOwinHandlerFilters /// /// Represents a filter that excludes the associated handlers if authorization request caching was not enabled. /// - public class RequireAuthorizationRequestCachingEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireAuthorizationRequestCachingEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -39,7 +39,7 @@ public static class OpenIddictServerOwinHandlerFilters /// Represents a filter that excludes the associated handlers if the /// pass-through mode was not enabled for the authorization endpoint. /// - public class RequireAuthorizationEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireAuthorizationEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -60,7 +60,7 @@ public static class OpenIddictServerOwinHandlerFilters /// /// Represents a filter that excludes the associated handlers if error pass-through was not enabled. /// - public class RequireErrorPassthroughEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireErrorPassthroughEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -81,7 +81,7 @@ public static class OpenIddictServerOwinHandlerFilters /// /// Represents a filter that excludes the associated handlers if logout request caching was not enabled. /// - public class RequireLogoutRequestCachingEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireLogoutRequestCachingEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -103,7 +103,7 @@ public static class OpenIddictServerOwinHandlerFilters /// Represents a filter that excludes the associated handlers if the /// pass-through mode was not enabled for the logout endpoint. /// - public class RequireLogoutEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireLogoutEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -124,7 +124,7 @@ public static class OpenIddictServerOwinHandlerFilters /// /// Represents a filter that excludes the associated handlers if no OWIN request can be found. /// - public class RequireOwinRequest : IOpenIddictServerHandlerFilter + public sealed class RequireOwinRequest : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -140,7 +140,7 @@ public static class OpenIddictServerOwinHandlerFilters /// /// Represents a filter that excludes the associated handlers if the HTTPS requirement was disabled. /// - public class RequireTransportSecurityRequirementEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireTransportSecurityRequirementEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -162,7 +162,7 @@ public static class OpenIddictServerOwinHandlerFilters /// Represents a filter that excludes the associated handlers if the /// pass-through mode was not enabled for the authorization endpoint. /// - public class RequireTokenEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireTokenEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -184,7 +184,7 @@ public static class OpenIddictServerOwinHandlerFilters /// Represents a filter that excludes the associated handlers if the /// pass-through mode was not enabled for the userinfo endpoint. /// - public class RequireUserinfoEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireUserinfoEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; @@ -206,7 +206,7 @@ public static class OpenIddictServerOwinHandlerFilters /// Represents a filter that excludes the associated handlers if the /// pass-through mode was not enabled for the verification endpoint. /// - public class RequireVerificationEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireVerificationEndpointPassthroughEnabled : IOpenIddictServerHandlerFilter { private readonly IOptionsMonitor _options; diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Authentication.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Authentication.cs index f0d1fc56..272f9221 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Authentication.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Authentication.cs @@ -57,7 +57,7 @@ public static partial class OpenIddictServerOwinHandlers /// 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. /// - public class RestoreCachedRequestParameters : IOpenIddictServerHandler + public sealed class RestoreCachedRequestParameters : IOpenIddictServerHandler { private readonly IDistributedCache _cache; @@ -151,7 +151,7 @@ public static partial class OpenIddictServerOwinHandlers /// 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. /// - public class CacheRequestParameters : IOpenIddictServerHandler + public sealed class CacheRequestParameters : IOpenIddictServerHandler { private readonly IDistributedCache _cache; private readonly IOptionsMonitor _options; @@ -257,7 +257,7 @@ public static partial class OpenIddictServerOwinHandlers /// 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. /// - public class RemoveCachedRequest : IOpenIddictServerHandler + public sealed class RemoveCachedRequest : IOpenIddictServerHandler { private readonly IDistributedCache _cache; @@ -305,7 +305,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for processing authorization responses using the form_post response mode. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessFormPostResponse : IOpenIddictServerHandler + public sealed class ProcessFormPostResponse : IOpenIddictServerHandler { private readonly HtmlEncoder _encoder; @@ -399,7 +399,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for processing authorization responses using the query response mode. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessQueryResponse : IOpenIddictServerHandler + public sealed class ProcessQueryResponse : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -463,7 +463,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for processing authorization responses using the fragment response mode. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessFragmentResponse : IOpenIddictServerHandler + public sealed class ProcessFragmentResponse : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Device.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Device.cs index d27aa142..cbd2ab88 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Device.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Device.cs @@ -58,7 +58,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for processing verification responses that should trigger a host redirection. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessHostRedirectionResponse : IOpenIddictServerHandler + public sealed class ProcessHostRedirectionResponse : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Session.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Session.cs index 6c423e2c..1604376a 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Session.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Session.cs @@ -55,7 +55,7 @@ public static partial class OpenIddictServerOwinHandlers /// 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. /// - public class RestoreCachedRequestParameters : IOpenIddictServerHandler + public sealed class RestoreCachedRequestParameters : IOpenIddictServerHandler { private readonly IDistributedCache _cache; @@ -149,7 +149,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for caching logout requests, if applicable. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class CacheRequestParameters : IOpenIddictServerHandler + public sealed class CacheRequestParameters : IOpenIddictServerHandler { private readonly IDistributedCache _cache; private readonly IOptionsMonitor _options; @@ -255,7 +255,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for removing cached logout requests from the distributed cache. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class RemoveCachedRequest : IOpenIddictServerHandler + public sealed class RemoveCachedRequest : IOpenIddictServerHandler { private readonly IDistributedCache _cache; @@ -303,7 +303,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for processing logout responses. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessQueryResponse : IOpenIddictServerHandler + public sealed class ProcessQueryResponse : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -366,7 +366,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for processing logout responses that should trigger a host redirection. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessHostRedirectionResponse : IOpenIddictServerHandler + public sealed class ProcessHostRedirectionResponse : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.cs index 2ea020ab..bd04e1a0 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.cs @@ -58,7 +58,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for inferring the endpoint type from the request address. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class InferEndpointType : IOpenIddictServerHandler + public sealed class InferEndpointType : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -163,7 +163,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for infering the issuer URL from the HTTP request host and validating it. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class InferIssuerFromHost : IOpenIddictServerHandler + public sealed class InferIssuerFromHost : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -227,7 +227,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for rejecting OpenID Connect requests that don't use transport security. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ValidateTransportSecurityRequirement : IOpenIddictServerHandler + public sealed class ValidateTransportSecurityRequirement : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -280,7 +280,7 @@ public static partial class OpenIddictServerOwinHandlers /// OWIN authentication properties specified by the application that triggered the challenge operation. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ResolveHostChallengeProperties : IOpenIddictServerHandler + public sealed class ResolveHostChallengeProperties : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -358,7 +358,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for attaching the error details using the OWIN authentication properties. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class AttachHostChallengeError : IOpenIddictServerHandler + public sealed class AttachHostChallengeError : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -400,7 +400,7 @@ public static partial class OpenIddictServerOwinHandlers /// OWIN authentication properties specified by the application that triggered the sign-in operation. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ResolveHostSignInProperties : IOpenIddictServerHandler + public sealed class ResolveHostSignInProperties : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -479,7 +479,7 @@ public static partial class OpenIddictServerOwinHandlers /// OWIN authentication properties specified by the application that triggered the sign-out operation. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ResolveHostSignOutProperties : IOpenIddictServerHandler + public sealed class ResolveHostSignOutProperties : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -557,7 +557,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for extracting OpenID Connect requests from GET HTTP requests. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ExtractGetRequest : IOpenIddictServerHandler where TContext : BaseValidatingContext + public sealed class ExtractGetRequest : IOpenIddictServerHandler where TContext : BaseValidatingContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -608,7 +608,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for extracting OpenID Connect requests from GET or POST HTTP requests. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ExtractGetOrPostRequest : IOpenIddictServerHandler where TContext : BaseValidatingContext + public sealed class ExtractGetOrPostRequest : IOpenIddictServerHandler where TContext : BaseValidatingContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -688,7 +688,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for extracting OpenID Connect requests from POST HTTP requests. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ExtractPostRequest : IOpenIddictServerHandler where TContext : BaseValidatingContext + public sealed class ExtractPostRequest : IOpenIddictServerHandler where TContext : BaseValidatingContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -763,7 +763,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for extracting client credentials from the standard HTTP Authorization header. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ExtractBasicAuthenticationCredentials : IOpenIddictServerHandler + public sealed class ExtractBasicAuthenticationCredentials : IOpenIddictServerHandler where TContext : BaseValidatingContext { /// @@ -862,7 +862,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for extracting an access token from the standard HTTP Authorization header. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ExtractAccessToken : IOpenIddictServerHandler + public sealed class ExtractAccessToken : IOpenIddictServerHandler where TContext : BaseValidatingContext { /// @@ -908,7 +908,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for enabling the pass-through mode for the received request. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class EnablePassthroughMode : IOpenIddictServerHandler + public sealed class EnablePassthroughMode : IOpenIddictServerHandler where TContext : BaseRequestContext where TFilter : IOpenIddictServerHandlerFilter { @@ -942,7 +942,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for attaching an appropriate HTTP status code. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class AttachHttpResponseCode : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class AttachHttpResponseCode : IOpenIddictServerHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -1004,7 +1004,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for attaching an OWIN response chalenge to the context, if necessary. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class AttachOwinResponseChallenge : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class AttachOwinResponseChallenge : IOpenIddictServerHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -1056,7 +1056,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for suppressing the redirection applied by FormsAuthenticationModule, if necessary. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class SuppressFormsAuthenticationRedirect : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class SuppressFormsAuthenticationRedirect : IOpenIddictServerHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -1123,7 +1123,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for attaching the appropriate HTTP response cache headers. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class AttachCacheControlHeader : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class AttachCacheControlHeader : IOpenIddictServerHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -1162,7 +1162,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for attaching errors details to the WWW-Authenticate header. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class AttachWwwAuthenticateHeader : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class AttachWwwAuthenticateHeader : IOpenIddictServerHandler where TContext : BaseRequestContext { private readonly IOptionsMonitor _options; @@ -1284,7 +1284,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for processing challenge responses that contain a WWW-Authenticate header. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessChallengeErrorResponse : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class ProcessChallengeErrorResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -1327,7 +1327,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for processing OpenID Connect responses that must be returned as JSON. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessJsonResponse : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class ProcessJsonResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -1382,7 +1382,7 @@ public static partial class OpenIddictServerOwinHandlers /// middleware in the pipeline at a later stage (e.g an ASP.NET MVC action or a NancyFX module). /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessPassthroughErrorResponse : IOpenIddictServerHandler + public sealed class ProcessPassthroughErrorResponse : IOpenIddictServerHandler where TContext : BaseRequestContext where TFilter : IOpenIddictServerHandlerFilter { @@ -1427,7 +1427,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for processing OpenID Connect responses that must be returned as plain-text. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessLocalErrorResponse : IOpenIddictServerHandler + public sealed class ProcessLocalErrorResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { /// @@ -1501,7 +1501,7 @@ public static partial class OpenIddictServerOwinHandlers /// Contains the logic responsible for processing OpenID Connect responses that don't specify any parameter. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessEmptyResponse : IOpenIddictServerHandler + public sealed class ProcessEmptyResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { /// diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinMiddleware.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinMiddleware.cs index 61387aa4..cf6e1f46 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinMiddleware.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinMiddleware.cs @@ -15,7 +15,7 @@ namespace OpenIddict.Server.Owin; /// that support middleware resolution, like Autofac. Since it depends on scoped services, /// it is NOT recommended to instantiate it as a singleton like a regular OWIN middleware. /// -public class OpenIddictServerOwinMiddleware : AuthenticationMiddleware +public sealed class OpenIddictServerOwinMiddleware : AuthenticationMiddleware { private readonly IOpenIddictServerDispatcher _dispatcher; private readonly IOpenIddictServerFactory _factory; diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinMiddlewareFactory.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinMiddlewareFactory.cs index d80eb5dd..ae37a02c 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinMiddlewareFactory.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinMiddlewareFactory.cs @@ -13,7 +13,7 @@ namespace OpenIddict.Server.Owin; /// Provides the entry point necessary to instantiate and register the scoped /// in an OWIN/Katana pipeline. /// -public class OpenIddictServerOwinMiddlewareFactory : OwinMiddleware +public sealed class OpenIddictServerOwinMiddlewareFactory : OwinMiddleware { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs index bb1b3be5..4c4ff3e5 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs @@ -12,7 +12,7 @@ namespace OpenIddict.Server.Owin; /// /// Provides various settings needed to configure the OpenIddict OWIN server integration. /// -public class OpenIddictServerOwinOptions : AuthenticationOptions +public sealed class OpenIddictServerOwinOptions : AuthenticationOptions { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Server/OpenIddictServerBuilder.cs b/src/OpenIddict.Server/OpenIddictServerBuilder.cs index f18572c2..6db61c25 100644 --- a/src/OpenIddict.Server/OpenIddictServerBuilder.cs +++ b/src/OpenIddict.Server/OpenIddictServerBuilder.cs @@ -20,7 +20,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// /// Exposes the necessary methods required to configure the OpenIddict server services. /// -public class OpenIddictServerBuilder +public sealed class OpenIddictServerBuilder { /// /// Initializes a new instance of . @@ -864,7 +864,6 @@ public class OpenIddictServerBuilder using var store = new X509Store(name, location); store.Open(OpenFlags.ReadOnly); - return AddSigningCertificate( store.Certificates.Find(X509FindType.FindByThumbprint, thumbprint, validOnly: false) .OfType() diff --git a/src/OpenIddict.Server/OpenIddictServerConfiguration.cs b/src/OpenIddict.Server/OpenIddictServerConfiguration.cs index 5768572b..6ff6e659 100644 --- a/src/OpenIddict.Server/OpenIddictServerConfiguration.cs +++ b/src/OpenIddict.Server/OpenIddictServerConfiguration.cs @@ -13,7 +13,7 @@ namespace OpenIddict.Server; /// /// Contains the methods required to ensure that the OpenIddict server configuration is valid. /// -public class OpenIddictServerConfiguration : IPostConfigureOptions +public sealed class OpenIddictServerConfiguration : IPostConfigureOptions { /// /// Populates the default OpenIddict server options and ensures diff --git a/src/OpenIddict.Server/OpenIddictServerDispatcher.cs b/src/OpenIddict.Server/OpenIddictServerDispatcher.cs index 8d2ddfc6..19a60fc5 100644 --- a/src/OpenIddict.Server/OpenIddictServerDispatcher.cs +++ b/src/OpenIddict.Server/OpenIddictServerDispatcher.cs @@ -9,7 +9,7 @@ using Microsoft.Extensions.Options; namespace OpenIddict.Server; -public class OpenIddictServerDispatcher : IOpenIddictServerDispatcher +public sealed class OpenIddictServerDispatcher : IOpenIddictServerDispatcher { private readonly ILogger _logger; private readonly IOptionsMonitor _options; diff --git a/src/OpenIddict.Server/OpenIddictServerEvents.Authentication.cs b/src/OpenIddict.Server/OpenIddictServerEvents.Authentication.cs index caeaa5d4..de2ea63f 100644 --- a/src/OpenIddict.Server/OpenIddictServerEvents.Authentication.cs +++ b/src/OpenIddict.Server/OpenIddictServerEvents.Authentication.cs @@ -15,7 +15,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the authorization endpoint to give the user code /// a chance to manually extract the authorization request from the ambient HTTP context. /// - public class ExtractAuthorizationRequestContext : BaseValidatingContext + public sealed class ExtractAuthorizationRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -39,7 +39,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the authorization endpoint /// to determine if the request is valid and should continue to be processed. /// - public class ValidateAuthorizationRequestContext : BaseValidatingContext + public sealed class ValidateAuthorizationRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -104,7 +104,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each validated authorization request /// to allow the user code to decide how the request should be handled. /// - public class HandleAuthorizationRequestContext : BaseValidatingTicketContext + public sealed class HandleAuthorizationRequestContext : BaseValidatingTicketContext { /// /// Creates a new instance of the class. @@ -156,7 +156,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called before the authorization response is returned to the caller. /// - public class ApplyAuthorizationResponseContext : BaseRequestContext + public sealed class ApplyAuthorizationResponseContext : BaseRequestContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Server/OpenIddictServerEvents.Device.cs b/src/OpenIddict.Server/OpenIddictServerEvents.Device.cs index fe3755f5..605f20b4 100644 --- a/src/OpenIddict.Server/OpenIddictServerEvents.Device.cs +++ b/src/OpenIddict.Server/OpenIddictServerEvents.Device.cs @@ -14,7 +14,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the device endpoint to give the user code /// a chance to manually extract the device request from the ambient HTTP context. /// - public class ExtractDeviceRequestContext : BaseValidatingContext + public sealed class ExtractDeviceRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -38,7 +38,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the device endpoint /// to determine if the request is valid and should continue to be processed. /// - public class ValidateDeviceRequestContext : BaseValidatingClientContext + public sealed class ValidateDeviceRequestContext : BaseValidatingClientContext { /// /// Creates a new instance of the class. @@ -62,7 +62,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each validated device request /// to allow the user code to decide how the request should be handled. /// - public class HandleDeviceRequestContext : BaseValidatingTicketContext + public sealed class HandleDeviceRequestContext : BaseValidatingTicketContext { /// /// Creates a new instance of the class. @@ -108,7 +108,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called before the device response is returned to the caller. /// - public class ApplyDeviceResponseContext : BaseRequestContext + public sealed class ApplyDeviceResponseContext : BaseRequestContext { /// /// Creates a new instance of the class. @@ -148,7 +148,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the verification endpoint to give the user code /// a chance to manually extract the verification request from the ambient HTTP context. /// - public class ExtractVerificationRequestContext : BaseValidatingContext + public sealed class ExtractVerificationRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -172,7 +172,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the verification endpoint /// to determine if the request is valid and should continue to be processed. /// - public class ValidateVerificationRequestContext : BaseValidatingClientContext + public sealed class ValidateVerificationRequestContext : BaseValidatingClientContext { /// /// Creates a new instance of the class. @@ -201,7 +201,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each validated verification request /// to allow the user code to decide how the request should be handled. /// - public class HandleVerificationRequestContext : BaseValidatingTicketContext + public sealed class HandleVerificationRequestContext : BaseValidatingTicketContext { /// /// Creates a new instance of the class. @@ -252,7 +252,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called before the verification response is returned to the caller. /// - public class ApplyVerificationResponseContext : BaseRequestContext + public sealed class ApplyVerificationResponseContext : BaseRequestContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Server/OpenIddictServerEvents.Discovery.cs b/src/OpenIddict.Server/OpenIddictServerEvents.Discovery.cs index 8a548da6..39b13d27 100644 --- a/src/OpenIddict.Server/OpenIddictServerEvents.Discovery.cs +++ b/src/OpenIddict.Server/OpenIddictServerEvents.Discovery.cs @@ -14,7 +14,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the configuration endpoint to give the user code /// a chance to manually extract the configuration request from the ambient HTTP context. /// - public class ExtractConfigurationRequestContext : BaseValidatingContext + public sealed class ExtractConfigurationRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -38,7 +38,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the configuration endpoint /// to determine if the request is valid and should continue to be processed. /// - public class ValidateConfigurationRequestContext : BaseValidatingContext + public sealed class ValidateConfigurationRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -62,7 +62,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each validated configuration request /// to allow the user code to decide how the request should be handled. /// - public class HandleConfigurationRequestContext : BaseValidatingContext + public sealed class HandleConfigurationRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -195,7 +195,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called before the configuration response is returned to the caller. /// - public class ApplyConfigurationResponseContext : BaseRequestContext + public sealed class ApplyConfigurationResponseContext : BaseRequestContext { /// /// Creates a new instance of the class. @@ -235,7 +235,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the cryptography endpoint to give the user code /// a chance to manually extract the cryptography request from the ambient HTTP context. /// - public class ExtractCryptographyRequestContext : BaseValidatingContext + public sealed class ExtractCryptographyRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -268,7 +268,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the cryptography endpoint /// to determine if the request is valid and should continue to be processed. /// - public class ValidateCryptographyRequestContext : BaseValidatingContext + public sealed class ValidateCryptographyRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -292,7 +292,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each validated cryptography request /// to allow the user code to decide how the request should be handled. /// - public class HandleCryptographyRequestContext : BaseValidatingContext + public sealed class HandleCryptographyRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -320,7 +320,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called before the cryptography response is returned to the caller. /// - public class ApplyCryptographyResponseContext : BaseRequestContext + public sealed class ApplyCryptographyResponseContext : BaseRequestContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Server/OpenIddictServerEvents.Exchange.cs b/src/OpenIddict.Server/OpenIddictServerEvents.Exchange.cs index 412c3d14..fcb05ba7 100644 --- a/src/OpenIddict.Server/OpenIddictServerEvents.Exchange.cs +++ b/src/OpenIddict.Server/OpenIddictServerEvents.Exchange.cs @@ -14,7 +14,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the token endpoint to give the user code /// a chance to manually extract the token request from the ambient HTTP context. /// - public class ExtractTokenRequestContext : BaseValidatingContext + public sealed class ExtractTokenRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -38,7 +38,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the token endpoint /// to determine if the request is valid and should continue to be processed. /// - public class ValidateTokenRequestContext : BaseValidatingClientContext + public sealed class ValidateTokenRequestContext : BaseValidatingClientContext { /// /// Creates a new instance of the class. @@ -68,7 +68,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each validated token request /// to allow the user code to decide how the request should be handled. /// - public class HandleTokenRequestContext : BaseValidatingTicketContext + public sealed class HandleTokenRequestContext : BaseValidatingTicketContext { /// /// Creates a new instance of the class. @@ -114,7 +114,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called before the token response is returned to the caller. /// - public class ApplyTokenResponseContext : BaseRequestContext + public sealed class ApplyTokenResponseContext : BaseRequestContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Server/OpenIddictServerEvents.Introspection.cs b/src/OpenIddict.Server/OpenIddictServerEvents.Introspection.cs index ee579830..25ebcd39 100644 --- a/src/OpenIddict.Server/OpenIddictServerEvents.Introspection.cs +++ b/src/OpenIddict.Server/OpenIddictServerEvents.Introspection.cs @@ -14,7 +14,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the introspection endpoint to give the user code /// a chance to manually extract the introspection request from the ambient HTTP context. /// - public class ExtractIntrospectionRequestContext : BaseValidatingContext + public sealed class ExtractIntrospectionRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -38,7 +38,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the introspection endpoint /// to determine if the request is valid and should continue to be processed. /// - public class ValidateIntrospectionRequestContext : BaseValidatingClientContext + public sealed class ValidateIntrospectionRequestContext : BaseValidatingClientContext { /// /// Creates a new instance of the class. @@ -73,7 +73,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each validated introspection request /// to allow the user code to decide how the request should be handled. /// - public class HandleIntrospectionRequestContext : BaseValidatingContext + public sealed class HandleIntrospectionRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -171,7 +171,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called before the introspection response is returned to the caller. /// - public class ApplyIntrospectionResponseContext : BaseRequestContext + public sealed class ApplyIntrospectionResponseContext : BaseRequestContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Server/OpenIddictServerEvents.Protection.cs b/src/OpenIddict.Server/OpenIddictServerEvents.Protection.cs index 06792665..04872f37 100644 --- a/src/OpenIddict.Server/OpenIddictServerEvents.Protection.cs +++ b/src/OpenIddict.Server/OpenIddictServerEvents.Protection.cs @@ -15,7 +15,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called when generating a token. /// - public class GenerateTokenContext : BaseValidatingContext + public sealed class GenerateTokenContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -91,7 +91,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called when validating a token. /// - public class ValidateTokenContext : BaseValidatingContext + public sealed class ValidateTokenContext : BaseValidatingContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Server/OpenIddictServerEvents.Revocation.cs b/src/OpenIddict.Server/OpenIddictServerEvents.Revocation.cs index efc73b67..72a5fdb2 100644 --- a/src/OpenIddict.Server/OpenIddictServerEvents.Revocation.cs +++ b/src/OpenIddict.Server/OpenIddictServerEvents.Revocation.cs @@ -14,7 +14,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the revocation endpoint to give the user code /// a chance to manually extract the revocation request from the ambient HTTP context. /// - public class ExtractRevocationRequestContext : BaseValidatingContext + public sealed class ExtractRevocationRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -38,7 +38,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the revocation endpoint /// to determine if the request is valid and should continue to be processed. /// - public class ValidateRevocationRequestContext : BaseValidatingClientContext + public sealed class ValidateRevocationRequestContext : BaseValidatingClientContext { /// /// Creates a new instance of the class. @@ -73,7 +73,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each validated revocation request /// to allow the user code to decide how the request should be handled. /// - public class HandleRevocationRequestContext : BaseValidatingContext + public sealed class HandleRevocationRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -101,7 +101,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called before the revocation response is returned to the caller. /// - public class ApplyRevocationResponseContext : BaseRequestContext + public sealed class ApplyRevocationResponseContext : BaseRequestContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Server/OpenIddictServerEvents.Session.cs b/src/OpenIddict.Server/OpenIddictServerEvents.Session.cs index 97051d7c..03a88aae 100644 --- a/src/OpenIddict.Server/OpenIddictServerEvents.Session.cs +++ b/src/OpenIddict.Server/OpenIddictServerEvents.Session.cs @@ -15,7 +15,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the logout endpoint to give the user code /// a chance to manually extract the logout request from the ambient HTTP context. /// - public class ExtractLogoutRequestContext : BaseValidatingContext + public sealed class ExtractLogoutRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -39,7 +39,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the logout endpoint /// to determine if the request is valid and should continue to be processed. /// - public class ValidateLogoutRequestContext : BaseValidatingContext + public sealed class ValidateLogoutRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -102,7 +102,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each validated logout request /// to allow the user code to decide how the request should be handled. /// - public class HandleLogoutRequestContext : BaseValidatingContext + public sealed class HandleLogoutRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -157,7 +157,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called before the logout response is returned to the caller. /// - public class ApplyLogoutResponseContext : BaseRequestContext + public sealed class ApplyLogoutResponseContext : BaseRequestContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Server/OpenIddictServerEvents.Userinfo.cs b/src/OpenIddict.Server/OpenIddictServerEvents.Userinfo.cs index a23babb0..c70fb75d 100644 --- a/src/OpenIddict.Server/OpenIddictServerEvents.Userinfo.cs +++ b/src/OpenIddict.Server/OpenIddictServerEvents.Userinfo.cs @@ -15,7 +15,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the userinfo endpoint to give the user code /// a chance to manually extract the userinfo request from the ambient HTTP context. /// - public class ExtractUserinfoRequestContext : BaseValidatingContext + public sealed class ExtractUserinfoRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -39,7 +39,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each request to the userinfo endpoint /// to determine if the request is valid and should continue to be processed. /// - public class ValidateUserinfoRequestContext : BaseValidatingContext + public sealed class ValidateUserinfoRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -68,7 +68,7 @@ public static partial class OpenIddictServerEvents /// Represents an event called for each validated userinfo request /// to allow the user code to decide how the request should be handled. /// - public class HandleUserinfoRequestContext : BaseValidatingContext + public sealed class HandleUserinfoRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -189,7 +189,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called before the userinfo response is returned to the caller. /// - public class ApplyUserinfoResponseContext : BaseRequestContext + public sealed class ApplyUserinfoResponseContext : BaseRequestContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Server/OpenIddictServerEvents.cs b/src/OpenIddict.Server/OpenIddictServerEvents.cs index cae31091..399e1622 100644 --- a/src/OpenIddict.Server/OpenIddictServerEvents.cs +++ b/src/OpenIddict.Server/OpenIddictServerEvents.cs @@ -204,7 +204,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called when processing an incoming request. /// - public class ProcessRequestContext : BaseValidatingContext + public sealed class ProcessRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -218,7 +218,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called when processing an errored response. /// - public class ProcessErrorContext : BaseRequestContext + public sealed class ProcessErrorContext : BaseRequestContext { /// /// Creates a new instance of the class. @@ -270,7 +270,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called when processing an authentication operation. /// - public class ProcessAuthenticationContext : BaseValidatingContext + public sealed class ProcessAuthenticationContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -536,7 +536,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called when processing a challenge response. /// - public class ProcessChallengeContext : BaseValidatingContext + public sealed class ProcessChallengeContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -578,7 +578,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called when processing a sign-in response. /// - public class ProcessSignInContext : BaseValidatingTicketContext + public sealed class ProcessSignInContext : BaseValidatingTicketContext { /// /// Creates a new instance of the class. @@ -794,7 +794,7 @@ public static partial class OpenIddictServerEvents /// /// Represents an event called when processing a sign-out response. /// - public class ProcessSignOutContext : BaseValidatingContext + public sealed class ProcessSignOutContext : BaseValidatingContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Server/OpenIddictServerFactory.cs b/src/OpenIddict.Server/OpenIddictServerFactory.cs index b3223325..46488fc4 100644 --- a/src/OpenIddict.Server/OpenIddictServerFactory.cs +++ b/src/OpenIddict.Server/OpenIddictServerFactory.cs @@ -9,7 +9,7 @@ using Microsoft.Extensions.Options; namespace OpenIddict.Server; -public class OpenIddictServerFactory : IOpenIddictServerFactory +public sealed class OpenIddictServerFactory : IOpenIddictServerFactory { private readonly ILogger _logger; private readonly IOptionsMonitor _options; diff --git a/src/OpenIddict.Server/OpenIddictServerHandler.cs b/src/OpenIddict.Server/OpenIddictServerHandler.cs index 90b59e9c..3d760a21 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandler.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandler.cs @@ -10,7 +10,7 @@ namespace OpenIddict.Server; /// Represents a handler able to process events. /// /// The type of the events handled by this instance. -public class OpenIddictServerHandler : IOpenIddictServerHandler where TContext : BaseContext +public sealed class OpenIddictServerHandler : IOpenIddictServerHandler where TContext : BaseContext { private readonly Func _handler; diff --git a/src/OpenIddict.Server/OpenIddictServerHandlerDescriptor.cs b/src/OpenIddict.Server/OpenIddictServerHandlerDescriptor.cs index 660f3800..c3c98819 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlerDescriptor.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlerDescriptor.cs @@ -15,7 +15,7 @@ namespace OpenIddict.Server; /// Represents an immutable descriptor of an OpenIddict server event handler. /// [DebuggerDisplay("{ServiceDescriptor?.ServiceType}")] -public class OpenIddictServerHandlerDescriptor +public sealed class OpenIddictServerHandlerDescriptor { /// /// Creates a new instance of the class. @@ -60,7 +60,7 @@ public class OpenIddictServerHandlerDescriptor /// Contains methods allowing to build a descriptor instance. /// /// The event context type. - public class Builder where TContext : BaseContext + public sealed class Builder where TContext : BaseContext { private ServiceDescriptor? _descriptor; private readonly List _filters = new(); diff --git a/src/OpenIddict.Server/OpenIddictServerHandlerFilters.cs b/src/OpenIddict.Server/OpenIddictServerHandlerFilters.cs index b7354ca0..8b221a5c 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlerFilters.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlerFilters.cs @@ -14,7 +14,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if no access token is generated. /// - public class RequireAccessTokenGenerated : IOpenIddictServerHandlerFilter + public sealed class RequireAccessTokenGenerated : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(ProcessSignInContext context) { @@ -30,7 +30,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if no access token is validated. /// - public class RequireAccessTokenValidated : IOpenIddictServerHandlerFilter + public sealed class RequireAccessTokenValidated : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -46,7 +46,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if no authorization code is generated. /// - public class RequireAuthorizationCodeGenerated : IOpenIddictServerHandlerFilter + public sealed class RequireAuthorizationCodeGenerated : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(ProcessSignInContext context) { @@ -62,7 +62,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if no authorization code is validated. /// - public class RequireAuthorizationCodeValidated : IOpenIddictServerHandlerFilter + public sealed class RequireAuthorizationCodeValidated : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -78,7 +78,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if the request is not an authorization request. /// - public class RequireAuthorizationRequest : IOpenIddictServerHandlerFilter + public sealed class RequireAuthorizationRequest : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -94,7 +94,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if authorization storage was not enabled. /// - public class RequireAuthorizationStorageEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireAuthorizationStorageEnabled : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -110,7 +110,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers when no client identifier is received. /// - public class RequireClientIdParameter : IOpenIddictServerHandlerFilter + public sealed class RequireClientIdParameter : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -126,7 +126,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if the request is not a configuration request. /// - public class RequireConfigurationRequest : IOpenIddictServerHandlerFilter + public sealed class RequireConfigurationRequest : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -142,7 +142,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if the request is not a cryptography request. /// - public class RequireCryptographyRequest : IOpenIddictServerHandlerFilter + public sealed class RequireCryptographyRequest : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -158,7 +158,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if the degraded mode was not enabled. /// - public class RequireDegradedModeDisabled : IOpenIddictServerHandlerFilter + public sealed class RequireDegradedModeDisabled : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -174,7 +174,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if no device code is generated. /// - public class RequireDeviceCodeGenerated : IOpenIddictServerHandlerFilter + public sealed class RequireDeviceCodeGenerated : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(ProcessSignInContext context) { @@ -190,7 +190,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if no device code is validated. /// - public class RequireDeviceCodeValidated : IOpenIddictServerHandlerFilter + public sealed class RequireDeviceCodeValidated : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -206,7 +206,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if the request is not a device request. /// - public class RequireDeviceRequest : IOpenIddictServerHandlerFilter + public sealed class RequireDeviceRequest : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -222,7 +222,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if endpoint permissions were disabled. /// - public class RequireEndpointPermissionsEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireEndpointPermissionsEnabled : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -238,7 +238,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if no generic token is validated. /// - public class RequireGenericTokenValidated : IOpenIddictServerHandlerFilter + public sealed class RequireGenericTokenValidated : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -254,7 +254,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if grant type permissions were disabled. /// - public class RequireGrantTypePermissionsEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireGrantTypePermissionsEnabled : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -270,7 +270,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if no identity token is generated. /// - public class RequireIdentityTokenGenerated : IOpenIddictServerHandlerFilter + public sealed class RequireIdentityTokenGenerated : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(ProcessSignInContext context) { @@ -286,7 +286,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if no identity token is validated. /// - public class RequireIdentityTokenValidated : IOpenIddictServerHandlerFilter + public sealed class RequireIdentityTokenValidated : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -302,7 +302,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if the request is not an introspection request. /// - public class RequireIntrospectionRequest : IOpenIddictServerHandlerFilter + public sealed class RequireIntrospectionRequest : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -318,7 +318,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if the selected token format is not JSON Web Token. /// - public class RequireJsonWebTokenFormat : IOpenIddictServerHandlerFilter + public sealed class RequireJsonWebTokenFormat : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(GenerateTokenContext context) { @@ -334,7 +334,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if the request is not a logout request. /// - public class RequireLogoutRequest : IOpenIddictServerHandlerFilter + public sealed class RequireLogoutRequest : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -350,7 +350,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers when no post_logout_redirect_uri is received. /// - public class RequirePostLogoutRedirectUriParameter : IOpenIddictServerHandlerFilter + public sealed class RequirePostLogoutRedirectUriParameter : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -366,7 +366,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if reference access tokens are disabled. /// - public class RequireReferenceAccessTokensEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireReferenceAccessTokensEnabled : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -382,7 +382,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if reference refresh tokens are disabled. /// - public class RequireReferenceRefreshTokensEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireReferenceRefreshTokensEnabled : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -398,7 +398,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if no refresh token is generated. /// - public class RequireRefreshTokenGenerated : IOpenIddictServerHandlerFilter + public sealed class RequireRefreshTokenGenerated : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(ProcessSignInContext context) { @@ -414,7 +414,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if no refresh token is validated. /// - public class RequireRefreshTokenValidated : IOpenIddictServerHandlerFilter + public sealed class RequireRefreshTokenValidated : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -430,7 +430,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if response type permissions were disabled. /// - public class RequireResponseTypePermissionsEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireResponseTypePermissionsEnabled : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -446,7 +446,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if the request is not a revocation request. /// - public class RequireRevocationRequest : IOpenIddictServerHandlerFilter + public sealed class RequireRevocationRequest : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -462,7 +462,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if scope permissions were disabled. /// - public class RequireScopePermissionsEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireScopePermissionsEnabled : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -478,7 +478,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if scope validation was not enabled. /// - public class RequireScopeValidationEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireScopeValidationEnabled : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -494,7 +494,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if sliding refresh token expiration was disabled. /// - public class RequireSlidingRefreshTokenExpirationEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireSlidingRefreshTokenExpirationEnabled : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -510,7 +510,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if no token entry is created in the database. /// - public class RequireTokenEntryCreated : IOpenIddictServerHandlerFilter + public sealed class RequireTokenEntryCreated : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(GenerateTokenContext context) { @@ -526,7 +526,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if token lifetime validation was disabled. /// - public class RequireTokenLifetimeValidationEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireTokenLifetimeValidationEnabled : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(ValidateTokenContext context) { @@ -542,7 +542,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if the token payload is not persisted in the database. /// - public class RequireTokenPayloadPersisted : IOpenIddictServerHandlerFilter + public sealed class RequireTokenPayloadPersisted : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(GenerateTokenContext context) { @@ -558,7 +558,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if the request is not a token request. /// - public class RequireTokenRequest : IOpenIddictServerHandlerFilter + public sealed class RequireTokenRequest : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -574,7 +574,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if token storage was not enabled. /// - public class RequireTokenStorageEnabled : IOpenIddictServerHandlerFilter + public sealed class RequireTokenStorageEnabled : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -590,7 +590,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if no user code is generated. /// - public class RequireUserCodeGenerated : IOpenIddictServerHandlerFilter + public sealed class RequireUserCodeGenerated : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(ProcessSignInContext context) { @@ -606,7 +606,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if no user code is validated. /// - public class RequireUserCodeValidated : IOpenIddictServerHandlerFilter + public sealed class RequireUserCodeValidated : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -622,7 +622,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if the request is not a userinfo request. /// - public class RequireUserinfoRequest : IOpenIddictServerHandlerFilter + public sealed class RequireUserinfoRequest : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -638,7 +638,7 @@ public static class OpenIddictServerHandlerFilters /// /// Represents a filter that excludes the associated handlers if the request is not a verification request. /// - public class RequireVerificationRequest : IOpenIddictServerHandlerFilter + public sealed class RequireVerificationRequest : IOpenIddictServerHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Authentication.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Authentication.cs index cd4da7c9..d8ddb7db 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Authentication.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Authentication.cs @@ -70,7 +70,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for extracting authorization requests and invoking the corresponding event handlers. /// - public class ExtractAuthorizationRequest : IOpenIddictServerHandler + public sealed class ExtractAuthorizationRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -132,7 +132,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating authorization requests and invoking the corresponding event handlers. /// - public class ValidateAuthorizationRequest : IOpenIddictServerHandler + public sealed class ValidateAuthorizationRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -198,7 +198,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for handling authorization requests and invoking the corresponding event handlers. /// - public class HandleAuthorizationRequest : IOpenIddictServerHandler + public sealed class HandleAuthorizationRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -295,7 +295,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for processing sign-in responses and invoking the corresponding event handlers. /// - public class ApplyAuthorizationResponse : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class ApplyAuthorizationResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -343,7 +343,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting authorization requests that specify the unsupported request parameter. /// - public class ValidateRequestParameter : IOpenIddictServerHandler + public sealed class ValidateRequestParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -383,7 +383,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting authorization requests that specify the unsupported request_uri parameter. /// - public class ValidateRequestUriParameter : IOpenIddictServerHandler + public sealed class ValidateRequestUriParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -423,7 +423,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting authorization requests that lack the mandatory client_id parameter. /// - public class ValidateClientIdParameter : IOpenIddictServerHandler + public sealed class ValidateClientIdParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -464,7 +464,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting authorization requests that lack the mandatory redirect_uri parameter. /// - public class ValidateRedirectUriParameter : IOpenIddictServerHandler + public sealed class ValidateRedirectUriParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -569,7 +569,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting authorization requests that specify an invalid response_type parameter. /// - public class ValidateResponseTypeParameter : IOpenIddictServerHandler + public sealed class ValidateResponseTypeParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -664,7 +664,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting authorization requests that specify an invalid response_mode parameter. /// - public class ValidateResponseModeParameter : IOpenIddictServerHandler + public sealed class ValidateResponseModeParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -746,7 +746,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting authorization requests that don't specify a valid scope parameter. /// - public class ValidateScopeParameter : IOpenIddictServerHandler + public sealed class ValidateScopeParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -797,7 +797,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting authorization requests that don't specify a nonce. /// - public class ValidateNonceParameter : IOpenIddictServerHandler + public sealed class ValidateNonceParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -846,7 +846,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting authorization requests that don't specify a valid prompt parameter. /// - public class ValidatePromptParameter : IOpenIddictServerHandler + public sealed class ValidatePromptParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -888,7 +888,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting authorization requests that don't specify valid PKCE parameters. /// - public class ValidateProofKeyForCodeExchangeParameters : IOpenIddictServerHandler + public sealed class ValidateProofKeyForCodeExchangeParameters : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1008,7 +1008,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting authorization requests that use an invalid client_id. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientId : IOpenIddictServerHandler + public sealed class ValidateClientId : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -1059,7 +1059,7 @@ public static partial class OpenIddictServerHandlers /// Note: this handler is not used when the degraded mode is enabled /// or when response type permissions enforcement is not disabled. /// - public class ValidateClientType : IOpenIddictServerHandler + public sealed class ValidateClientType : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -1121,7 +1121,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting authorization requests that use an invalid redirect_uri. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientRedirectUri : IOpenIddictServerHandler + public sealed class ValidateClientRedirectUri : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -1195,7 +1195,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting authorization requests that use unregistered scopes. /// Note: this handler partially works with the degraded mode but is not used when scope validation is disabled. /// - public class ValidateScopes : IOpenIddictServerHandler + public sealed class ValidateScopes : IOpenIddictServerHandler { private readonly IOpenIddictScopeManager? _scopeManager; @@ -1274,7 +1274,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting authorization requests made by unauthorized applications. /// Note: this handler is not used when the degraded mode is enabled or when endpoint permissions are disabled. /// - public class ValidateEndpointPermissions : IOpenIddictServerHandler + public sealed class ValidateEndpointPermissions : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -1327,7 +1327,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting authorization requests made by unauthorized applications. /// Note: this handler is not used when the degraded mode is enabled or when grant type permissions are disabled. /// - public class ValidateGrantTypePermissions : IOpenIddictServerHandler + public sealed class ValidateGrantTypePermissions : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -1425,7 +1425,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting authorization requests made by unauthorized applications. /// Note: this handler is not used when the degraded mode is enabled or when grant type permissions are disabled. /// - public class ValidateResponseTypePermissions : IOpenIddictServerHandler + public sealed class ValidateResponseTypePermissions : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -1503,7 +1503,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting authorization requests made by unauthorized applications. /// Note: this handler is not used when the degraded mode is enabled or when scope permissions are disabled. /// - public class ValidateScopePermissions : IOpenIddictServerHandler + public sealed class ValidateScopePermissions : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -1567,7 +1567,7 @@ public static partial class OpenIddictServerHandlers /// applications for which proof key for code exchange (PKCE) was enforced. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateProofKeyForCodeExchangeRequirement : IOpenIddictServerHandler + public sealed class ValidateProofKeyForCodeExchangeRequirement : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -1625,7 +1625,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting authorization /// requests that don't specify a valid id_token_hint. /// - public class ValidateToken : IOpenIddictServerHandler + public sealed class ValidateToken : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -1687,7 +1687,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting authorization requests that specify an identity /// token hint that cannot be used by the client application sending the authorization request. /// - public class ValidateAuthorizedParty : IOpenIddictServerHandler + public sealed class ValidateAuthorizedParty : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1737,7 +1737,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for attaching the principal /// extracted from the identity token hint to the event context. /// - public class AttachPrincipal : IOpenIddictServerHandler + public sealed class AttachPrincipal : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1771,7 +1771,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for inferring the redirect URL /// used to send the response back to the client application. /// - public class AttachRedirectUri : IOpenIddictServerHandler + public sealed class AttachRedirectUri : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1814,7 +1814,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for inferring the response mode /// used to send the response back to the client application. /// - public class InferResponseMode : IOpenIddictServerHandler + public sealed class InferResponseMode : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1856,7 +1856,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the state to the response. /// - public class AttachResponseState : IOpenIddictServerHandler + public sealed class AttachResponseState : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1893,7 +1893,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for attaching an "iss" parameter /// containing the address of the authorization server to the response. /// - public class AttachIssuer : IOpenIddictServerHandler + public sealed class AttachIssuer : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Device.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Device.cs index 75a20614..dfa8a044 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Device.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Device.cs @@ -61,7 +61,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for extracting device requests and invoking the corresponding event handlers. /// - public class ExtractDeviceRequest : IOpenIddictServerHandler + public sealed class ExtractDeviceRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -123,7 +123,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating device requests and invoking the corresponding event handlers. /// - public class ValidateDeviceRequest : IOpenIddictServerHandler + public sealed class ValidateDeviceRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -180,7 +180,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for handling device requests and invoking the corresponding event handlers. /// - public class HandleDeviceRequest : IOpenIddictServerHandler + public sealed class HandleDeviceRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -281,7 +281,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for processing sign-in responses and invoking the corresponding event handlers. /// - public class ApplyDeviceResponse : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class ApplyDeviceResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -329,7 +329,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting device requests that don't specify a client identifier. /// - public class ValidateClientIdParameter : IOpenIddictServerHandler + public sealed class ValidateClientIdParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -370,7 +370,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting device requests that don't specify a valid scope parameter. /// - public class ValidateScopeParameter : IOpenIddictServerHandler + public sealed class ValidateScopeParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -409,7 +409,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting authorization requests that use unregistered scopes. /// Note: this handler partially works with the degraded mode but is not used when scope validation is disabled. /// - public class ValidateScopes : IOpenIddictServerHandler + public sealed class ValidateScopes : IOpenIddictServerHandler { private readonly IOpenIddictScopeManager? _scopeManager; @@ -488,7 +488,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting device requests that use an invalid client_id. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientId : IOpenIddictServerHandler + public sealed class ValidateClientId : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -541,7 +541,7 @@ public static partial class OpenIddictServerHandlers /// whose client type is not compatible with the requested grant type. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientType : IOpenIddictServerHandler + public sealed class ValidateClientType : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -612,7 +612,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting device requests specifying an invalid client secret. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientSecret : IOpenIddictServerHandler + public sealed class ValidateClientSecret : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -673,7 +673,7 @@ public static partial class OpenIddictServerHandlers /// applications that haven't been granted the device endpoint permission. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateEndpointPermissions : IOpenIddictServerHandler + public sealed class ValidateEndpointPermissions : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -727,7 +727,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting device requests made by unauthorized applications. /// Note: this handler is not used when the degraded mode is enabled or when grant type permissions are disabled. /// - public class ValidateGrantTypePermissions : IOpenIddictServerHandler + public sealed class ValidateGrantTypePermissions : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -796,7 +796,7 @@ public static partial class OpenIddictServerHandlers /// that haven't been granted the appropriate grant type permission. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateScopePermissions : IOpenIddictServerHandler + public sealed class ValidateScopePermissions : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -859,7 +859,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for extracting verification requests and invoking the corresponding event handlers. /// - public class ExtractVerificationRequest : IOpenIddictServerHandler + public sealed class ExtractVerificationRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -921,7 +921,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating verification requests and invoking the corresponding event handlers. /// - public class ValidateVerificationRequest : IOpenIddictServerHandler + public sealed class ValidateVerificationRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -978,7 +978,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for handling verification requests and invoking the corresponding event handlers. /// - public class HandleVerificationRequest : IOpenIddictServerHandler + public sealed class HandleVerificationRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -1075,7 +1075,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for processing sign-in responses and invoking the corresponding event handlers. /// - public class ApplyVerificationResponse : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class ApplyVerificationResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -1123,7 +1123,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the claims principal resolved from the user code. /// - public class AttachUserCodePrincipal : IOpenIddictServerHandler + public sealed class AttachUserCodePrincipal : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Discovery.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Discovery.cs index 979a2474..863d3d44 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Discovery.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Discovery.cs @@ -60,7 +60,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for extracting configuration requests and invoking the corresponding event handlers. /// - public class ExtractConfigurationRequest : IOpenIddictServerHandler + public sealed class ExtractConfigurationRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -122,7 +122,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating configuration requests and invoking the corresponding event handlers. /// - public class ValidateConfigurationRequest : IOpenIddictServerHandler + public sealed class ValidateConfigurationRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -179,7 +179,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for handling configuration requests and invoking the corresponding event handlers. /// - public class HandleConfigurationRequest : IOpenIddictServerHandler + public sealed class HandleConfigurationRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -265,7 +265,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for processing configuration responses and invoking the corresponding event handlers. /// - public class ApplyConfigurationResponse : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class ApplyConfigurationResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -313,7 +313,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the endpoint URLs to the provider discovery document. /// - public class AttachEndpoints : IOpenIddictServerHandler + public sealed class AttachEndpoints : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -404,7 +404,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the supported grant types to the provider discovery document. /// - public class AttachGrantTypes : IOpenIddictServerHandler + public sealed class AttachGrantTypes : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -433,7 +433,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the supported response modes to the provider discovery document. /// - public class AttachResponseModes : IOpenIddictServerHandler + public sealed class AttachResponseModes : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -462,7 +462,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the supported response types to the provider discovery document. /// - public class AttachResponseTypes : IOpenIddictServerHandler + public sealed class AttachResponseTypes : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -492,7 +492,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for attaching the supported client /// authentication methods to the provider discovery document. /// - public class AttachClientAuthenticationMethods : IOpenIddictServerHandler + public sealed class AttachClientAuthenticationMethods : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -538,7 +538,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for attaching the supported /// code challenge methods to the provider discovery document. /// - public class AttachCodeChallengeMethods : IOpenIddictServerHandler + public sealed class AttachCodeChallengeMethods : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -567,7 +567,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the supported response types to the provider discovery document. /// - public class AttachScopes : IOpenIddictServerHandler + public sealed class AttachScopes : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -596,7 +596,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the supported claims to the provider discovery document. /// - public class AttachClaims : IOpenIddictServerHandler + public sealed class AttachClaims : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -625,7 +625,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the supported subject types to the provider discovery document. /// - public class AttachSubjectTypes : IOpenIddictServerHandler + public sealed class AttachSubjectTypes : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -654,7 +654,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the supported signing algorithms to the provider discovery document. /// - public class AttachSigningAlgorithms : IOpenIddictServerHandler + public sealed class AttachSigningAlgorithms : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -720,7 +720,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching additional metadata to the provider discovery document. /// - public class AttachAdditionalMetadata : IOpenIddictServerHandler + public sealed class AttachAdditionalMetadata : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -758,7 +758,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for extracting cryptography requests and invoking the corresponding event handlers. /// - public class ExtractCryptographyRequest : IOpenIddictServerHandler + public sealed class ExtractCryptographyRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -820,7 +820,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating cryptography requests and invoking the corresponding event handlers. /// - public class ValidateCryptographyRequest : IOpenIddictServerHandler + public sealed class ValidateCryptographyRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -877,7 +877,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for handling cryptography requests and invoking the corresponding event handlers. /// - public class HandleCryptographyRequest : IOpenIddictServerHandler + public sealed class HandleCryptographyRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -1005,7 +1005,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for processing cryptography responses and invoking the corresponding event handlers. /// - public class ApplyCryptographyResponse : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class ApplyCryptographyResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -1053,7 +1053,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the signing keys to the JWKS document. /// - public class AttachSigningKeys : IOpenIddictServerHandler + public sealed class AttachSigningKeys : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Exchange.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Exchange.cs index beca0e9e..d06315cc 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Exchange.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Exchange.cs @@ -76,7 +76,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for extracting token requests and invoking the corresponding event handlers. /// - public class ExtractTokenRequest : IOpenIddictServerHandler + public sealed class ExtractTokenRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -138,7 +138,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating token requests and invoking the corresponding event handlers. /// - public class ValidateTokenRequest : IOpenIddictServerHandler + public sealed class ValidateTokenRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -199,7 +199,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for handling token requests and invoking the corresponding event handlers. /// - public class HandleTokenRequest : IOpenIddictServerHandler + public sealed class HandleTokenRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -296,7 +296,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for processing sign-in responses and invoking the corresponding event handlers. /// - public class ApplyTokenResponse : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class ApplyTokenResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -344,7 +344,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting token requests that specify an invalid grant type. /// - public class ValidateGrantType : IOpenIddictServerHandler + public sealed class ValidateGrantType : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -409,7 +409,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting token requests that don't specify a client identifier. /// - public class ValidateClientIdParameter : IOpenIddictServerHandler + public sealed class ValidateClientIdParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -459,7 +459,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting token requests that don't /// specify an authorization code for the authorization code grant type. /// - public class ValidateAuthorizationCodeParameter : IOpenIddictServerHandler + public sealed class ValidateAuthorizationCodeParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -501,7 +501,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting token requests that don't /// specify client credentials for the client credentials grant type. /// - public class ValidateClientCredentialsParameters : IOpenIddictServerHandler + public sealed class ValidateClientCredentialsParameters : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -542,7 +542,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting token requests that /// don't specify a device code for the device code grant type. /// - public class ValidateDeviceCodeParameter : IOpenIddictServerHandler + public sealed class ValidateDeviceCodeParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -582,7 +582,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting token requests that /// specify invalid parameters for the refresh token grant type. /// - public class ValidateRefreshTokenParameter : IOpenIddictServerHandler + public sealed class ValidateRefreshTokenParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -624,7 +624,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting token requests /// that specify invalid parameters for the password grant type. /// - public class ValidateResourceOwnerCredentialsParameters : IOpenIddictServerHandler + public sealed class ValidateResourceOwnerCredentialsParameters : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -666,7 +666,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting token requests that don't specify valid PKCE parameters. /// - public class ValidateProofKeyForCodeExchangeParameters : IOpenIddictServerHandler + public sealed class ValidateProofKeyForCodeExchangeParameters : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -715,7 +715,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting authorization requests that use unregistered scopes. /// Note: this handler partially works with the degraded mode but is not used when scope validation is disabled. /// - public class ValidateScopes : IOpenIddictServerHandler + public sealed class ValidateScopes : IOpenIddictServerHandler { private readonly IOpenIddictScopeManager? _scopeManager; @@ -794,7 +794,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting token requests that use an invalid client_id. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientId : IOpenIddictServerHandler + public sealed class ValidateClientId : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -847,7 +847,7 @@ public static partial class OpenIddictServerHandlers /// whose client type is not compatible with the requested grant type. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientType : IOpenIddictServerHandler + public sealed class ValidateClientType : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -931,7 +931,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting token requests specifying an invalid client secret. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientSecret : IOpenIddictServerHandler + public sealed class ValidateClientSecret : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -992,7 +992,7 @@ public static partial class OpenIddictServerHandlers /// applications that haven't been granted the token endpoint permission. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateEndpointPermissions : IOpenIddictServerHandler + public sealed class ValidateEndpointPermissions : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -1047,7 +1047,7 @@ public static partial class OpenIddictServerHandlers /// that haven't been granted the appropriate grant type permissions. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateGrantTypePermissions : IOpenIddictServerHandler + public sealed class ValidateGrantTypePermissions : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -1117,7 +1117,7 @@ public static partial class OpenIddictServerHandlers /// that haven't been granted the appropriate grant type permission. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateScopePermissions : IOpenIddictServerHandler + public sealed class ValidateScopePermissions : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -1182,7 +1182,7 @@ public static partial class OpenIddictServerHandlers /// applications for which proof key for code exchange (PKCE) was enforced. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateProofKeyForCodeExchangeRequirement : IOpenIddictServerHandler + public sealed class ValidateProofKeyForCodeExchangeRequirement : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -1246,7 +1246,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting token requests that don't /// specify a valid authorization code, device code or refresh token. /// - public class ValidateToken : IOpenIddictServerHandler + public sealed class ValidateToken : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -1317,7 +1317,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting token requests that use an authorization code, /// a device code or a refresh token that was issued for a different client application. /// - public class ValidatePresenters : IOpenIddictServerHandler + public sealed class ValidatePresenters : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1409,7 +1409,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting token requests that specify an invalid redirect_uri. /// - public class ValidateRedirectUri : IOpenIddictServerHandler + public sealed class ValidateRedirectUri : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1480,7 +1480,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting token requests that specify an invalid code verifier. /// - public class ValidateCodeVerifier : IOpenIddictServerHandler + public sealed class ValidateCodeVerifier : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1590,7 +1590,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting token requests that specify scopes that /// were not initially granted by the resource owner during the authorization request. /// - public class ValidateGrantedScopes : IOpenIddictServerHandler + public sealed class ValidateGrantedScopes : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1662,7 +1662,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for attaching the principal extracted /// from the authorization code/refresh token to the event context. /// - public class AttachPrincipal : IOpenIddictServerHandler + public sealed class AttachPrincipal : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1700,7 +1700,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for converting token errors to standard invalid_grant responses. /// - public class NormalizeErrorResponse : IOpenIddictServerHandler + public sealed class NormalizeErrorResponse : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Introspection.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Introspection.cs index c4ffce6c..d6d1dc99 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Introspection.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Introspection.cs @@ -59,7 +59,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for extracting introspection requests and invoking the corresponding event handlers. /// - public class ExtractIntrospectionRequest : IOpenIddictServerHandler + public sealed class ExtractIntrospectionRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -121,7 +121,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating introspection requests and invoking the corresponding event handlers. /// - public class ValidateIntrospectionRequest : IOpenIddictServerHandler + public sealed class ValidateIntrospectionRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -182,7 +182,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for handling introspection requests and invoking the corresponding event handlers. /// - public class HandleIntrospectionRequest : IOpenIddictServerHandler + public sealed class HandleIntrospectionRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -285,7 +285,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for processing sign-in responses and invoking the corresponding event handlers. /// - public class ApplyIntrospectionResponse : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class ApplyIntrospectionResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -333,7 +333,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting introspection requests that don't specify a token. /// - public class ValidateTokenParameter : IOpenIddictServerHandler + public sealed class ValidateTokenParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -373,7 +373,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting introspection requests that don't specify a client identifier. /// - public class ValidateClientIdParameter : IOpenIddictServerHandler + public sealed class ValidateClientIdParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -414,7 +414,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting introspection requests that use an invalid client_id. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientId : IOpenIddictServerHandler + public sealed class ValidateClientId : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -467,7 +467,7 @@ public static partial class OpenIddictServerHandlers /// whose client type is not compatible with the presence or absence of a client secret. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientType : IOpenIddictServerHandler + public sealed class ValidateClientType : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -538,7 +538,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting introspection requests specifying an invalid client secret. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientSecret : IOpenIddictServerHandler + public sealed class ValidateClientSecret : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -599,7 +599,7 @@ public static partial class OpenIddictServerHandlers /// applications that haven't been granted the introspection endpoint permission. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateEndpointPermissions : IOpenIddictServerHandler + public sealed class ValidateEndpointPermissions : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -652,7 +652,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting introspection requests that don't specify a valid token. /// - public class ValidateToken : IOpenIddictServerHandler + public sealed class ValidateToken : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -713,7 +713,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting introspection requests that specify an unsupported token. /// - public class ValidateTokenType : IOpenIddictServerHandler + public sealed class ValidateTokenType : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -756,7 +756,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting introspection requests that specify a token /// that cannot be introspected by the client application sending the introspection requests. /// - public class ValidateAuthorizedParty : IOpenIddictServerHandler + public sealed class ValidateAuthorizedParty : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -826,7 +826,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for attaching the principal /// extracted from the introspected token to the event context. /// - public class AttachPrincipal : IOpenIddictServerHandler + public sealed class AttachPrincipal : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -861,7 +861,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the metadata claims extracted from the token the event context. /// - public class AttachMetadataClaims : IOpenIddictServerHandler + public sealed class AttachMetadataClaims : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -911,7 +911,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for attaching the application-specific claims extracted from the token the event context. /// Note: this handler is not used when the degraded mode is enabled. /// - public class AttachApplicationClaims : IOpenIddictServerHandler + public sealed class AttachApplicationClaims : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -1078,7 +1078,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for converting introspection errors to standard active: false responses. /// - public class NormalizeErrorResponse : IOpenIddictServerHandler + public sealed class NormalizeErrorResponse : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Protection.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Protection.cs index f717994f..339f5845 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Protection.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Protection.cs @@ -47,7 +47,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for resolving the validation parameters used to validate tokens. /// - public class ResolveTokenValidationParameters : IOpenIddictServerHandler + public sealed class ResolveTokenValidationParameters : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -121,7 +121,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for validating reference token identifiers. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateReferenceTokenIdentifier : IOpenIddictServerHandler + public sealed class ValidateReferenceTokenIdentifier : IOpenIddictServerHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -242,7 +242,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating tokens generated using IdentityModel. /// - public class ValidateIdentityModelToken : IOpenIddictServerHandler + public sealed class ValidateIdentityModelToken : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -393,7 +393,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for normalizing the scope claims stored in the tokens. /// - public class NormalizeScopeClaims : IOpenIddictServerHandler + public sealed class NormalizeScopeClaims : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -438,7 +438,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for mapping internal claims used by OpenIddict. /// - public class MapInternalClaims : IOpenIddictServerHandler + public sealed class MapInternalClaims : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -542,7 +542,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for restoring the properties associated with a reference token entry. /// Note: this handler is not used when the degraded mode is enabled. /// - public class RestoreReferenceTokenProperties : IOpenIddictServerHandler + public sealed class RestoreReferenceTokenProperties : IOpenIddictServerHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -590,7 +590,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting authentication demands for which no valid principal was resolved. /// - public class ValidatePrincipal : IOpenIddictServerHandler + public sealed class ValidatePrincipal : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -667,7 +667,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting authentication demands that use an expired token. /// - public class ValidateExpirationDate : IOpenIddictServerHandler + public sealed class ValidateExpirationDate : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -728,7 +728,7 @@ public static partial class OpenIddictServerHandlers /// use a token whose entry is no longer valid (e.g was revoked). /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateTokenEntry : IOpenIddictServerHandler + public sealed class ValidateTokenEntry : IOpenIddictServerHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -931,7 +931,7 @@ public static partial class OpenIddictServerHandlers /// associated authorization entry is no longer valid (e.g was revoked). /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateAuthorizationEntry : IOpenIddictServerHandler + public sealed class ValidateAuthorizationEntry : IOpenIddictServerHandler { private readonly IOpenIddictAuthorizationManager _authorizationManager; @@ -999,7 +999,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for resolving the signing and encryption credentials used to protect tokens. /// - public class AttachSecurityCredentials : IOpenIddictServerHandler + public sealed class AttachSecurityCredentials : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1048,7 +1048,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for creating a token entry. /// Note: this handler is not used when the degraded mode is enabled. /// - public class CreateTokenEntry : IOpenIddictServerHandler + public sealed class CreateTokenEntry : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; private readonly IOpenIddictTokenManager _tokenManager; @@ -1138,7 +1138,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for generating a token using IdentityModel. /// - public class GenerateIdentityModelToken : IOpenIddictServerHandler + public sealed class GenerateIdentityModelToken : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1272,7 +1272,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for converting the token to a reference token. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ConvertReferenceToken : IOpenIddictServerHandler + public sealed class ConvertReferenceToken : IOpenIddictServerHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -1362,7 +1362,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for beautifying user-typed tokens. /// Note: this handler is not used when the degraded mode is enabled. /// - public class BeautifyToken : IOpenIddictServerHandler + public sealed class BeautifyToken : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Revocation.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Revocation.cs index 4bd81442..2ba37168 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Revocation.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Revocation.cs @@ -52,7 +52,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for extracting revocation requests and invoking the corresponding event handlers. /// - public class ExtractRevocationRequest : IOpenIddictServerHandler + public sealed class ExtractRevocationRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -114,7 +114,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating revocation requests and invoking the corresponding event handlers. /// - public class ValidateRevocationRequest : IOpenIddictServerHandler + public sealed class ValidateRevocationRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -175,7 +175,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for handling revocation requests and invoking the corresponding event handlers. /// - public class HandleRevocationRequest : IOpenIddictServerHandler + public sealed class HandleRevocationRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -232,7 +232,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for processing sign-in responses and invoking the corresponding event handlers. /// - public class ApplyRevocationResponse : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class ApplyRevocationResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -280,7 +280,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting revocation requests that don't specify a token. /// - public class ValidateTokenParameter : IOpenIddictServerHandler + public sealed class ValidateTokenParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -320,7 +320,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting revocation requests that don't specify a client identifier. /// - public class ValidateClientIdParameter : IOpenIddictServerHandler + public sealed class ValidateClientIdParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -361,7 +361,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting revocation requests that use an invalid client_id. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientId : IOpenIddictServerHandler + public sealed class ValidateClientId : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -414,7 +414,7 @@ public static partial class OpenIddictServerHandlers /// whose client type is not compatible with the presence or absence of a client secret. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientType : IOpenIddictServerHandler + public sealed class ValidateClientType : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -485,7 +485,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting revocation requests specifying an invalid client secret. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientSecret : IOpenIddictServerHandler + public sealed class ValidateClientSecret : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -546,7 +546,7 @@ public static partial class OpenIddictServerHandlers /// applications that haven't been granted the revocation endpoint permission. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateEndpointPermissions : IOpenIddictServerHandler + public sealed class ValidateEndpointPermissions : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -599,7 +599,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting revocation requests that don't specify a valid token. /// - public class ValidateToken : IOpenIddictServerHandler + public sealed class ValidateToken : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -660,7 +660,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting revocation requests that specify an unsupported token. /// - public class ValidateTokenType : IOpenIddictServerHandler + public sealed class ValidateTokenType : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -703,7 +703,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting revocation requests that specify a token /// that cannot be revoked by the client application sending the revocation requests. /// - public class ValidateAuthorizedParty : IOpenIddictServerHandler + public sealed class ValidateAuthorizedParty : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -773,7 +773,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for attaching the principal /// extracted from the revoked token to the event context. /// - public class AttachPrincipal : IOpenIddictServerHandler + public sealed class AttachPrincipal : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -809,7 +809,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for revoking the token sent by the client application. /// Note: this handler is not used when the degraded mode is enabled. /// - public class RevokeToken : IOpenIddictServerHandler + public sealed class RevokeToken : IOpenIddictServerHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -882,7 +882,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for converting revocation errors to standard empty responses. /// - public class NormalizeErrorResponse : IOpenIddictServerHandler + public sealed class NormalizeErrorResponse : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Session.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Session.cs index a8a99398..0b5b498e 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Session.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Session.cs @@ -53,7 +53,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for extracting logout requests and invoking the corresponding event handlers. /// - public class ExtractLogoutRequest : IOpenIddictServerHandler + public sealed class ExtractLogoutRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -115,7 +115,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating logout requests and invoking the corresponding event handlers. /// - public class ValidateLogoutRequest : IOpenIddictServerHandler + public sealed class ValidateLogoutRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -176,7 +176,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for handling logout requests and invoking the corresponding event handlers. /// - public class HandleLogoutRequest : IOpenIddictServerHandler + public sealed class HandleLogoutRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -272,7 +272,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for processing sign-in responses and invoking the corresponding event handlers. /// - public class ApplyLogoutResponse : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class ApplyLogoutResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -320,7 +320,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting logout requests that specify an invalid post_logout_redirect_uri parameter. /// - public class ValidatePostLogoutRedirectUriParameter : IOpenIddictServerHandler + public sealed class ValidatePostLogoutRedirectUriParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -379,7 +379,7 @@ public static partial class OpenIddictServerHandlers /// that use an invalid client_id, if one was explicitly specified. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientId : IOpenIddictServerHandler + public sealed class ValidateClientId : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -435,7 +435,7 @@ public static partial class OpenIddictServerHandlers /// requests that use an invalid post_logout_redirect_uri. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateClientPostLogoutRedirectUri : IOpenIddictServerHandler + public sealed class ValidateClientPostLogoutRedirectUri : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -537,7 +537,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting logout requests made by unauthorized applications. /// Note: this handler is not used when the degraded mode is enabled or when endpoint permissions are disabled. /// - public class ValidateEndpointPermissions : IOpenIddictServerHandler + public sealed class ValidateEndpointPermissions : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; @@ -597,7 +597,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting logout requests that don't specify a valid id_token_hint. /// - public class ValidateToken : IOpenIddictServerHandler + public sealed class ValidateToken : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -659,7 +659,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting logout requests that specify an identity /// token hint that cannot be used by the client application sending the logout request. /// - public class ValidateAuthorizedParty : IOpenIddictServerHandler + public sealed class ValidateAuthorizedParty : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager? _applicationManager; @@ -779,7 +779,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for attaching the principal /// extracted from the identity token hint to the event context. /// - public class AttachPrincipal : IOpenIddictServerHandler + public sealed class AttachPrincipal : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -813,7 +813,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for inferring the redirect URL /// used to send the response back to the client application. /// - public class AttachPostLogoutRedirectUri : IOpenIddictServerHandler + public sealed class AttachPostLogoutRedirectUri : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -855,7 +855,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the state to the response. /// - public class AttachResponseState : IOpenIddictServerHandler + public sealed class AttachResponseState : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Userinfo.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Userinfo.cs index dd2b9d93..5868bdde 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Userinfo.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Userinfo.cs @@ -42,7 +42,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for extracting userinfo requests and invoking the corresponding event handlers. /// - public class ExtractUserinfoRequest : IOpenIddictServerHandler + public sealed class ExtractUserinfoRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -104,7 +104,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating userinfo requests and invoking the corresponding event handlers. /// - public class ValidateUserinfoRequest : IOpenIddictServerHandler + public sealed class ValidateUserinfoRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -165,7 +165,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for handling userinfo requests and invoking the corresponding event handlers. /// - public class HandleUserinfoRequest : IOpenIddictServerHandler + public sealed class HandleUserinfoRequest : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -257,7 +257,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for processing userinfo responses and invoking the corresponding event handlers. /// - public class ApplyUserinfoResponse : IOpenIddictServerHandler where TContext : BaseRequestContext + public sealed class ApplyUserinfoResponse : IOpenIddictServerHandler where TContext : BaseRequestContext { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -305,7 +305,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting userinfo requests that don't specify an access token. /// - public class ValidateAccessTokenParameter : IOpenIddictServerHandler + public sealed class ValidateAccessTokenParameter : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -344,7 +344,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting userinfo requests that don't specify a valid token. /// - public class ValidateToken : IOpenIddictServerHandler + public sealed class ValidateToken : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -406,7 +406,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for attaching the principal /// extracted from the access token to the event context. /// - public class AttachPrincipal : IOpenIddictServerHandler + public sealed class AttachPrincipal : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -441,7 +441,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the audiences to the userinfo response. /// - public class AttachAudiences : IOpenIddictServerHandler + public sealed class AttachAudiences : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -475,7 +475,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching well known claims to the userinfo response. /// - public class AttachClaims : IOpenIddictServerHandler + public sealed class AttachClaims : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.cs index d9c5c66e..3b03419c 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.cs @@ -104,7 +104,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting authentication demands made from unsupported endpoints. /// - public class ValidateAuthenticationDemand : IOpenIddictServerHandler + public sealed class ValidateAuthenticationDemand : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -148,7 +148,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for selecting the token types that should be validated. /// - public class EvaluateValidatedTokens : IOpenIddictServerHandler + public sealed class EvaluateValidatedTokens : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -253,7 +253,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for resolving the token from the incoming request. /// - public class ResolveValidatedTokens : IOpenIddictServerHandler + public sealed class ResolveValidatedTokens : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -338,7 +338,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting authentication demands that lack required tokens. /// - public class ValidateRequiredTokens : IOpenIddictServerHandler + public sealed class ValidateRequiredTokens : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -383,7 +383,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating the access token resolved from the context. /// - public class ValidateAccessToken : IOpenIddictServerHandler + public sealed class ValidateAccessToken : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -450,7 +450,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating the authorization code resolved from the context. /// - public class ValidateAuthorizationCode : IOpenIddictServerHandler + public sealed class ValidateAuthorizationCode : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -517,7 +517,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating the device code resolved from the context. /// - public class ValidateDeviceCode : IOpenIddictServerHandler + public sealed class ValidateDeviceCode : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -584,7 +584,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating tokens of unknown types resolved from the context. /// - public class ValidateGenericToken : IOpenIddictServerHandler + public sealed class ValidateGenericToken : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -658,7 +658,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating the identity token resolved from the context. /// - public class ValidateIdentityToken : IOpenIddictServerHandler + public sealed class ValidateIdentityToken : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -728,7 +728,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating the refresh token resolved from the context. /// - public class ValidateRefreshToken : IOpenIddictServerHandler + public sealed class ValidateRefreshToken : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -795,7 +795,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for validating the user code resolved from the context. /// - public class ValidateUserCode : IOpenIddictServerHandler + public sealed class ValidateUserCode : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -862,7 +862,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for rejecting challenge demands made from unsupported endpoints. /// - public class ValidateChallengeDemand : IOpenIddictServerHandler + public sealed class ValidateChallengeDemand : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -897,7 +897,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for ensuring that the challenge response contains an appropriate error. /// - public class AttachDefaultChallengeError : IOpenIddictServerHandler + public sealed class AttachDefaultChallengeError : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -958,7 +958,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting the device code entry associated with the user code. /// Note: this handler is not used when the degraded mode is enabled. /// - public class RejectDeviceCodeEntry : IOpenIddictServerHandler + public sealed class RejectDeviceCodeEntry : IOpenIddictServerHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -1017,7 +1017,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for rejecting the user code entry, if applicable. /// Note: this handler is not used when the degraded mode is enabled. /// - public class RejectUserCodeEntry : IOpenIddictServerHandler + public sealed class RejectUserCodeEntry : IOpenIddictServerHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -1076,7 +1076,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for attaching the parameters /// populated from user-defined handlers to the challenge response. /// - public class AttachCustomChallengeParameters : IOpenIddictServerHandler + public sealed class AttachCustomChallengeParameters : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1112,7 +1112,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for ensuring that the sign-in demand /// is compatible with the type of the endpoint that handled the request. /// - public class ValidateSignInDemand : IOpenIddictServerHandler + public sealed class ValidateSignInDemand : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1183,7 +1183,7 @@ public static partial class OpenIddictServerHandlers /// the received authorization code, device code, user code or refresh token. /// Note: this handler is not used when the degraded mode is enabled. /// - public class RedeemTokenEntry : IOpenIddictServerHandler + public sealed class RedeemTokenEntry : IOpenIddictServerHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -1299,7 +1299,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for re-attaching internal claims to the authentication principal. /// - public class RestoreInternalClaims : IOpenIddictServerHandler + public sealed class RestoreInternalClaims : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1387,7 +1387,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the user-defined properties to the authentication principal. /// - public class AttachHostProperties : IOpenIddictServerHandler + public sealed class AttachHostProperties : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1418,7 +1418,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching default scopes to the authentication principal. /// - public class AttachDefaultScopes : IOpenIddictServerHandler + public sealed class AttachDefaultScopes : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1455,7 +1455,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching default presenters to the authentication principal. /// - public class AttachDefaultPresenters : IOpenIddictServerHandler + public sealed class AttachDefaultPresenters : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1491,7 +1491,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for inferring resources from the audience claims if necessary. /// - public class InferResources : IOpenIddictServerHandler + public sealed class InferResources : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1531,7 +1531,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for selecting the token types that /// should be generated and optionally returned in the response. /// - public class EvaluateGeneratedTokens : IOpenIddictServerHandler + public sealed class EvaluateGeneratedTokens : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1630,7 +1630,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for creating an ad-hoc authorization, if necessary. /// Note: this handler is not used when the degraded mode is enabled. /// - public class AttachAuthorization : IOpenIddictServerHandler + public sealed class AttachAuthorization : IOpenIddictServerHandler { private readonly IOpenIddictApplicationManager _applicationManager; private readonly IOpenIddictAuthorizationManager _authorizationManager; @@ -1724,7 +1724,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for preparing and attaching the claims principal /// used to generate the access token, if one is going to be returned. /// - public class PrepareAccessTokenPrincipal : IOpenIddictServerHandler + public sealed class PrepareAccessTokenPrincipal : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1845,7 +1845,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for preparing and attaching the claims principal /// used to generate the authorization code, if one is going to be returned. /// - public class PrepareAuthorizationCodePrincipal : IOpenIddictServerHandler + public sealed class PrepareAuthorizationCodePrincipal : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -1934,7 +1934,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for preparing and attaching the claims principal /// used to generate the device code, if one is going to be returned. /// - public class PrepareDeviceCodePrincipal : IOpenIddictServerHandler + public sealed class PrepareDeviceCodePrincipal : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2010,7 +2010,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for preparing and attaching the claims principal /// used to generate the refresh token, if one is going to be returned. /// - public class PrepareRefreshTokenPrincipal : IOpenIddictServerHandler + public sealed class PrepareRefreshTokenPrincipal : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2097,7 +2097,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for preparing and attaching the claims principal /// used to generate the identity token, if one is going to be returned. /// - public class PrepareIdentityTokenPrincipal : IOpenIddictServerHandler + public sealed class PrepareIdentityTokenPrincipal : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2212,7 +2212,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for preparing and attaching the claims principal /// used to generate the user code, if one is going to be returned. /// - public class PrepareUserCodePrincipal : IOpenIddictServerHandler + public sealed class PrepareUserCodePrincipal : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2283,7 +2283,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for generating an access token for the current sign-in operation. /// - public class GenerateAccessToken : IOpenIddictServerHandler + public sealed class GenerateAccessToken : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -2351,7 +2351,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for generating an authorization code for the current sign-in operation. /// - public class GenerateAuthorizationCode : IOpenIddictServerHandler + public sealed class GenerateAuthorizationCode : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -2417,7 +2417,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for generating a device code for the current sign-in operation. /// - public class GenerateDeviceCode : IOpenIddictServerHandler + public sealed class GenerateDeviceCode : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -2490,7 +2490,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for generating a refresh token for the current sign-in operation. /// - public class GenerateRefreshToken : IOpenIddictServerHandler + public sealed class GenerateRefreshToken : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -2558,7 +2558,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for generating and attaching the device code identifier to the user code principal. /// - public class AttachDeviceCodeIdentifier : IOpenIddictServerHandler + public sealed class AttachDeviceCodeIdentifier : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2599,7 +2599,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for updating the existing reference device code entry. /// Note: this handler is not used when the degraded mode is enabled. /// - public class UpdateReferenceDeviceCodeEntry : IOpenIddictServerHandler + public sealed class UpdateReferenceDeviceCodeEntry : IOpenIddictServerHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -2673,7 +2673,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for generating and attaching the hashes of /// the access token and authorization code to the identity token principal. /// - public class AttachTokenDigests : IOpenIddictServerHandler + public sealed class AttachTokenDigests : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -2762,7 +2762,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for generating a user code for the current sign-in operation. /// - public class GenerateUserCode : IOpenIddictServerHandler + public sealed class GenerateUserCode : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -2828,7 +2828,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for generating an identity token for the current sign-in operation. /// - public class GenerateIdentityToken : IOpenIddictServerHandler + public sealed class GenerateIdentityToken : IOpenIddictServerHandler { private readonly IOpenIddictServerDispatcher _dispatcher; @@ -2895,7 +2895,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the appropriate parameters to the sign-in response. /// - public class AttachSignInParameters : IOpenIddictServerHandler + public sealed class AttachSignInParameters : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3034,7 +3034,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for attaching the parameters /// populated from user-defined handlers to the sign-in response. /// - public class AttachCustomSignInParameters : IOpenIddictServerHandler + public sealed class AttachCustomSignInParameters : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3070,7 +3070,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for ensuring that the sign-out demand /// is compatible with the type of the endpoint that handled the request. /// - public class ValidateSignOutDemand : IOpenIddictServerHandler + public sealed class ValidateSignOutDemand : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3103,7 +3103,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for attaching the parameters /// populated from user-defined handlers to the sign-out response. /// - public class AttachCustomSignOutParameters : IOpenIddictServerHandler + public sealed class AttachCustomSignOutParameters : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3138,7 +3138,7 @@ public static partial class OpenIddictServerHandlers /// /// Contains the logic responsible for attaching the appropriate parameters to the error response. /// - public class AttachErrorParameters : IOpenIddictServerHandler + public sealed class AttachErrorParameters : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -3170,7 +3170,7 @@ public static partial class OpenIddictServerHandlers /// Contains the logic responsible for attaching the parameters /// populated from user-defined handlers to the error response. /// - public class AttachCustomErrorParameters : IOpenIddictServerHandler + public sealed class AttachCustomErrorParameters : IOpenIddictServerHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Server/OpenIddictServerOptions.cs b/src/OpenIddict.Server/OpenIddictServerOptions.cs index 4478fe94..ec5c29e4 100644 --- a/src/OpenIddict.Server/OpenIddictServerOptions.cs +++ b/src/OpenIddict.Server/OpenIddictServerOptions.cs @@ -13,7 +13,7 @@ namespace OpenIddict.Server; /// /// Provides various settings needed to configure the OpenIddict server handler. /// -public class OpenIddictServerOptions +public sealed class OpenIddictServerOptions { /// /// Gets or sets the optional base address used to uniquely identify the authorization server. diff --git a/src/OpenIddict.Server/OpenIddictServerTransaction.cs b/src/OpenIddict.Server/OpenIddictServerTransaction.cs index 8d6252ce..f11ffa27 100644 --- a/src/OpenIddict.Server/OpenIddictServerTransaction.cs +++ b/src/OpenIddict.Server/OpenIddictServerTransaction.cs @@ -11,7 +11,7 @@ namespace OpenIddict.Server; /// /// Represents the context associated with an OpenID Connect server request. /// -public class OpenIddictServerTransaction +public sealed class OpenIddictServerTransaction { /// /// Gets or sets the type of the endpoint processing the current request. diff --git a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreBuilder.cs b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreBuilder.cs index 85749b0c..5cc43f4d 100644 --- a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreBuilder.cs +++ b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreBuilder.cs @@ -13,7 +13,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// Exposes the necessary methods required to configure /// the OpenIddict validation ASP.NET Core integration. /// -public class OpenIddictValidationAspNetCoreBuilder +public sealed class OpenIddictValidationAspNetCoreBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreConfiguration.cs b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreConfiguration.cs index 1e33e6e7..984da0cc 100644 --- a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreConfiguration.cs +++ b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreConfiguration.cs @@ -11,9 +11,9 @@ namespace OpenIddict.Validation.AspNetCore; /// /// Contains the methods required to ensure that the OpenIddict validation configuration is valid. /// -public class OpenIddictValidationAspNetCoreConfiguration : IConfigureOptions, - IConfigureOptions, - IPostConfigureOptions +public sealed class OpenIddictValidationAspNetCoreConfiguration : IConfigureOptions, + IConfigureOptions, + IPostConfigureOptions { /// /// Registers the OpenIddict validation handler in the global authentication options. diff --git a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreFeature.cs b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreFeature.cs index 5a56f3a5..fcbdda59 100644 --- a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreFeature.cs +++ b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreFeature.cs @@ -9,7 +9,7 @@ namespace OpenIddict.Validation.AspNetCore; /// /// Exposes the current validation transaction to the ASP.NET Core host. /// -public class OpenIddictValidationAspNetCoreFeature +public sealed class OpenIddictValidationAspNetCoreFeature { /// /// Gets or sets the validation transaction that encapsulates all specific diff --git a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandler.cs b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandler.cs index 2287413a..99b5ec21 100644 --- a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandler.cs +++ b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandler.cs @@ -15,7 +15,7 @@ namespace OpenIddict.Validation.AspNetCore; /// /// Provides the logic necessary to extract, validate and handle OpenID Connect requests. /// -public class OpenIddictValidationAspNetCoreHandler : AuthenticationHandler, +public sealed class OpenIddictValidationAspNetCoreHandler : AuthenticationHandler, IAuthenticationRequestHandler { private readonly IOpenIddictValidationDispatcher _dispatcher; diff --git a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandlerFilters.cs b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandlerFilters.cs index 6cd2a238..d95708ed 100644 --- a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandlerFilters.cs +++ b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandlerFilters.cs @@ -18,7 +18,7 @@ public static class OpenIddictValidationAspNetCoreHandlerFilters /// /// Represents a filter that excludes the associated handlers if no ASP.NET Core request can be found. /// - public class RequireHttpRequest : IOpenIddictValidationHandlerFilter + public sealed class RequireHttpRequest : IOpenIddictValidationHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { diff --git a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandlers.cs b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandlers.cs index e6888563..b5fc3016 100644 --- a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandlers.cs +++ b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandlers.cs @@ -61,7 +61,7 @@ public static partial class OpenIddictValidationAspNetCoreHandlers /// Contains the logic responsible for infering the default issuer from the HTTP request host and validating it. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class InferIssuerFromHost : IOpenIddictValidationHandler + public sealed class InferIssuerFromHost : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -125,7 +125,7 @@ public static partial class OpenIddictValidationAspNetCoreHandlers /// Contains the logic responsible for extracting the access token from the standard HTTP Authorization header. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ExtractAccessTokenFromAuthorizationHeader : IOpenIddictValidationHandler + public sealed class ExtractAccessTokenFromAuthorizationHeader : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -176,7 +176,7 @@ public static partial class OpenIddictValidationAspNetCoreHandlers /// Contains the logic responsible for extracting the access token from the standard access_token form parameter. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ExtractAccessTokenFromBodyForm : IOpenIddictValidationHandler + public sealed class ExtractAccessTokenFromBodyForm : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -231,7 +231,7 @@ public static partial class OpenIddictValidationAspNetCoreHandlers /// Contains the logic responsible for extracting the access token from the standard access_token query parameter. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ExtractAccessTokenFromQueryString : IOpenIddictValidationHandler + public sealed class ExtractAccessTokenFromQueryString : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -282,7 +282,7 @@ public static partial class OpenIddictValidationAspNetCoreHandlers /// ASP.NET Core authentication properties specified by the application that triggered the challenge operation. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ResolveHostChallengeProperties : IOpenIddictValidationHandler + public sealed class ResolveHostChallengeProperties : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -342,7 +342,7 @@ public static partial class OpenIddictValidationAspNetCoreHandlers /// Contains the logic responsible for attaching the error details using the ASP.NET Core authentication properties. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class AttachHostChallengeError : IOpenIddictValidationHandler + public sealed class AttachHostChallengeError : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -380,7 +380,7 @@ public static partial class OpenIddictValidationAspNetCoreHandlers /// Contains the logic responsible for attaching an appropriate HTTP status code. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class AttachHttpResponseCode : IOpenIddictValidationHandler where TContext : BaseRequestContext + public sealed class AttachHttpResponseCode : IOpenIddictValidationHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -430,7 +430,7 @@ public static partial class OpenIddictValidationAspNetCoreHandlers /// Contains the logic responsible for attaching the appropriate HTTP response cache headers. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class AttachCacheControlHeader : IOpenIddictValidationHandler where TContext : BaseRequestContext + public sealed class AttachCacheControlHeader : IOpenIddictValidationHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -469,7 +469,7 @@ public static partial class OpenIddictValidationAspNetCoreHandlers /// Contains the logic responsible for attaching errors details to the WWW-Authenticate header. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class AttachWwwAuthenticateHeader : IOpenIddictValidationHandler where TContext : BaseRequestContext + public sealed class AttachWwwAuthenticateHeader : IOpenIddictValidationHandler where TContext : BaseRequestContext { private readonly IOptionsMonitor _options; @@ -573,7 +573,7 @@ public static partial class OpenIddictValidationAspNetCoreHandlers /// Contains the logic responsible for processing challenge responses that contain a WWW-Authenticate header. /// Note: this handler is not used when the OpenID Connect request is not initially handled by ASP.NET Core. /// - public class ProcessChallengeErrorResponse : IOpenIddictValidationHandler where TContext : BaseRequestContext + public sealed class ProcessChallengeErrorResponse : IOpenIddictValidationHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreOptions.cs b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreOptions.cs index 20bba4f5..72e02c81 100644 --- a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreOptions.cs +++ b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreOptions.cs @@ -9,7 +9,7 @@ namespace OpenIddict.Validation.AspNetCore; /// /// Provides various settings needed to configure the OpenIddict ASP.NET Core validation integration. /// -public class OpenIddictValidationAspNetCoreOptions : AuthenticationSchemeOptions +public sealed class OpenIddictValidationAspNetCoreOptions : AuthenticationSchemeOptions { /// /// Gets or sets the optional "realm" value returned to the caller as part of the WWW-Authenticate header. diff --git a/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionBuilder.cs b/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionBuilder.cs index 8871525f..7b2ff255 100644 --- a/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionBuilder.cs +++ b/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionBuilder.cs @@ -14,7 +14,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// Exposes the necessary methods required to configure the /// OpenIddict ASP.NET Core Data Protection integration. /// -public class OpenIddictValidationDataProtectionBuilder +public sealed class OpenIddictValidationDataProtectionBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionConfiguration.cs b/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionConfiguration.cs index ce39d26c..7849bdca 100644 --- a/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionConfiguration.cs +++ b/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionConfiguration.cs @@ -12,8 +12,8 @@ namespace OpenIddict.Validation.DataProtection; /// /// Contains the methods required to ensure that the OpenIddict ASP.NET Core Data Protection configuration is valid. /// -public class OpenIddictValidationDataProtectionConfiguration : IConfigureOptions, - IPostConfigureOptions +public sealed class OpenIddictValidationDataProtectionConfiguration : IConfigureOptions, + IPostConfigureOptions { private readonly IDataProtectionProvider _dataProtectionProvider; diff --git a/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionFormatter.cs b/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionFormatter.cs index 2e369b6a..f8ea826e 100644 --- a/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionFormatter.cs +++ b/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionFormatter.cs @@ -10,7 +10,7 @@ using Properties = OpenIddict.Validation.DataProtection.OpenIddictValidationData namespace OpenIddict.Validation.DataProtection; -public class OpenIddictValidationDataProtectionFormatter : IOpenIddictValidationDataProtectionFormatter +public sealed class OpenIddictValidationDataProtectionFormatter : IOpenIddictValidationDataProtectionFormatter { public ClaimsPrincipal ReadToken(BinaryReader reader) { diff --git a/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionHandlers.Protection.cs b/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionHandlers.Protection.cs index 0c347bcb..e09ad676 100644 --- a/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionHandlers.Protection.cs +++ b/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionHandlers.Protection.cs @@ -29,7 +29,7 @@ public static partial class OpenIddictValidationDataProtectionHandlers /// /// Contains the logic responsible for validating tokens generated using Data Protection. /// - public class ValidateDataProtectionToken : IOpenIddictValidationHandler + public sealed class ValidateDataProtectionToken : IOpenIddictValidationHandler { private readonly IOptionsMonitor _options; diff --git a/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionOptions.cs b/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionOptions.cs index df967c85..dead4f9c 100644 --- a/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionOptions.cs +++ b/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionOptions.cs @@ -12,7 +12,7 @@ namespace OpenIddict.Validation.DataProtection; /// Provides various settings needed to configure the OpenIddict /// ASP.NET Core Data Protection validation integration. /// -public class OpenIddictValidationDataProtectionOptions +public sealed class OpenIddictValidationDataProtectionOptions { /// /// Gets or sets the data protection provider used to create the default diff --git a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinBuilder.cs b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinBuilder.cs index 89c87509..ea1c93d3 100644 --- a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinBuilder.cs +++ b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinBuilder.cs @@ -13,7 +13,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// Exposes the necessary methods required to configure /// the OpenIddict validation OWIN/Katana integration. /// -public class OpenIddictValidationOwinBuilder +public sealed class OpenIddictValidationOwinBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinConfiguration.cs b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinConfiguration.cs index fb033ae1..0c8d24f4 100644 --- a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinConfiguration.cs +++ b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinConfiguration.cs @@ -11,7 +11,7 @@ namespace OpenIddict.Validation.Owin; /// /// Contains the methods required to ensure that the OpenIddict validation configuration is valid. /// -public class OpenIddictValidationOwinConfiguration : IConfigureOptions +public sealed class OpenIddictValidationOwinConfiguration : IConfigureOptions { public void Configure(OpenIddictValidationOptions options) { diff --git a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandler.cs b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandler.cs index b31ebb7b..147fa6da 100644 --- a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandler.cs +++ b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandler.cs @@ -13,7 +13,7 @@ namespace OpenIddict.Validation.Owin; /// /// Provides the entry point necessary to register the OpenIddict validation in an OWIN pipeline. /// -public class OpenIddictValidationOwinHandler : AuthenticationHandler +public sealed class OpenIddictValidationOwinHandler : AuthenticationHandler { private readonly IOpenIddictValidationDispatcher _dispatcher; private readonly IOpenIddictValidationFactory _factory; diff --git a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandlerFilters.cs b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandlerFilters.cs index 91fcb70e..700c3163 100644 --- a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandlerFilters.cs +++ b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandlerFilters.cs @@ -16,7 +16,7 @@ public static class OpenIddictValidationOwinHandlerFilters /// /// Represents a filter that excludes the associated handlers if no OWIN request can be found. /// - public class RequireOwinRequest : IOpenIddictValidationHandlerFilter + public sealed class RequireOwinRequest : IOpenIddictValidationHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { diff --git a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandlers.cs b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandlers.cs index 0e1724af..cc9dc9ef 100644 --- a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandlers.cs +++ b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandlers.cs @@ -61,7 +61,7 @@ public static partial class OpenIddictValidationOwinHandlers /// Contains the logic responsible for infering the default issuer from the HTTP request host and validating it. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class InferIssuerFromHost : IOpenIddictValidationHandler + public sealed class InferIssuerFromHost : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -125,7 +125,7 @@ public static partial class OpenIddictValidationOwinHandlers /// Contains the logic responsible for extracting the access token from the standard HTTP Authorization header. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ExtractAccessTokenFromAuthorizationHeader : IOpenIddictValidationHandler + public sealed class ExtractAccessTokenFromAuthorizationHeader : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -176,7 +176,7 @@ public static partial class OpenIddictValidationOwinHandlers /// Contains the logic responsible for extracting the access token from the standard access_token form parameter. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ExtractAccessTokenFromBodyForm : IOpenIddictValidationHandler + public sealed class ExtractAccessTokenFromBodyForm : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -232,7 +232,7 @@ public static partial class OpenIddictValidationOwinHandlers /// Contains the logic responsible for extracting the access token from the standard access_token query parameter. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ExtractAccessTokenFromQueryString : IOpenIddictValidationHandler + public sealed class ExtractAccessTokenFromQueryString : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -284,7 +284,7 @@ public static partial class OpenIddictValidationOwinHandlers /// OWIN authentication properties specified by the application that triggered the challenge operation. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ResolveHostChallengeProperties : IOpenIddictValidationHandler + public sealed class ResolveHostChallengeProperties : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -362,7 +362,7 @@ public static partial class OpenIddictValidationOwinHandlers /// Contains the logic responsible for attaching the error details using the OWIN authentication properties. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class AttachHostChallengeError : IOpenIddictValidationHandler + public sealed class AttachHostChallengeError : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -403,7 +403,7 @@ public static partial class OpenIddictValidationOwinHandlers /// Contains the logic responsible for attaching an appropriate HTTP status code. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class AttachHttpResponseCode : IOpenIddictValidationHandler where TContext : BaseRequestContext + public sealed class AttachHttpResponseCode : IOpenIddictValidationHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -453,7 +453,7 @@ public static partial class OpenIddictValidationOwinHandlers /// Contains the logic responsible for attaching an OWIN response chalenge to the context, if necessary. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class AttachOwinResponseChallenge : IOpenIddictValidationHandler where TContext : BaseRequestContext + public sealed class AttachOwinResponseChallenge : IOpenIddictValidationHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -505,7 +505,7 @@ public static partial class OpenIddictValidationOwinHandlers /// Contains the logic responsible for suppressing the redirection applied by FormsAuthenticationModule, if necessary. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class SuppressFormsAuthenticationRedirect : IOpenIddictValidationHandler where TContext : BaseRequestContext + public sealed class SuppressFormsAuthenticationRedirect : IOpenIddictValidationHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -572,7 +572,7 @@ public static partial class OpenIddictValidationOwinHandlers /// Contains the logic responsible for attaching the appropriate HTTP response cache headers. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class AttachCacheControlHeader : IOpenIddictValidationHandler where TContext : BaseRequestContext + public sealed class AttachCacheControlHeader : IOpenIddictValidationHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -611,7 +611,7 @@ public static partial class OpenIddictValidationOwinHandlers /// Contains the logic responsible for attaching errors details to the WWW-Authenticate header. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class AttachWwwAuthenticateHeader : IOpenIddictValidationHandler where TContext : BaseRequestContext + public sealed class AttachWwwAuthenticateHeader : IOpenIddictValidationHandler where TContext : BaseRequestContext { private readonly IOptionsMonitor _options; @@ -715,7 +715,7 @@ public static partial class OpenIddictValidationOwinHandlers /// Contains the logic responsible for processing challenge responses that contain a WWW-Authenticate header. /// Note: this handler is not used when the OpenID Connect request is not initially handled by OWIN. /// - public class ProcessChallengeErrorResponse : IOpenIddictValidationHandler where TContext : BaseRequestContext + public sealed class ProcessChallengeErrorResponse : IOpenIddictValidationHandler where TContext : BaseRequestContext { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinMiddleware.cs b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinMiddleware.cs index 9ce506b9..f2b6a9c1 100644 --- a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinMiddleware.cs +++ b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinMiddleware.cs @@ -15,7 +15,7 @@ namespace OpenIddict.Validation.Owin; /// that support middleware resolution, like Autofac. Since it depends on scoped services, /// it is NOT recommended to instantiate it as a singleton like a regular OWIN middleware. /// -public class OpenIddictValidationOwinMiddleware : AuthenticationMiddleware +public sealed class OpenIddictValidationOwinMiddleware : AuthenticationMiddleware { private readonly IOpenIddictValidationDispatcher _dispatcher; private readonly IOpenIddictValidationFactory _factory; diff --git a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinMiddlewareFactory.cs b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinMiddlewareFactory.cs index a15a4761..fc53f203 100644 --- a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinMiddlewareFactory.cs +++ b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinMiddlewareFactory.cs @@ -13,7 +13,7 @@ namespace OpenIddict.Validation.Owin; /// Provides the entry point necessary to instantiate and register the scoped /// in an OWIN/Katana pipeline. /// -public class OpenIddictValidationOwinMiddlewareFactory : OwinMiddleware +public sealed class OpenIddictValidationOwinMiddlewareFactory : OwinMiddleware { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinOptions.cs b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinOptions.cs index ad95f5a2..8352d86c 100644 --- a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinOptions.cs +++ b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinOptions.cs @@ -9,7 +9,7 @@ namespace OpenIddict.Validation.Owin; /// /// Provides various settings needed to configure the OpenIddict OWIN validation integration. /// -public class OpenIddictValidationOwinOptions : AuthenticationOptions +public sealed class OpenIddictValidationOwinOptions : AuthenticationOptions { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationBuilder.cs b/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationBuilder.cs index c930fbc1..4165a3db 100644 --- a/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationBuilder.cs +++ b/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationBuilder.cs @@ -12,7 +12,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// /// Exposes the necessary methods required to configure the OpenIddict validation services. /// -public class OpenIddictValidationServerIntegrationBuilder +public sealed class OpenIddictValidationServerIntegrationBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationConfiguration.cs b/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationConfiguration.cs index 92336e98..149ba73a 100644 --- a/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationConfiguration.cs +++ b/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationConfiguration.cs @@ -12,8 +12,8 @@ namespace OpenIddict.Validation.ServerIntegration; /// /// Contains the methods required to ensure that the OpenIddict validation/server integration configuration is valid. /// -public class OpenIddictValidationServerIntegrationConfiguration : IConfigureOptions, - IPostConfigureOptions +public sealed class OpenIddictValidationServerIntegrationConfiguration : IConfigureOptions, + IPostConfigureOptions { private readonly IOptionsMonitor _options; diff --git a/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationOptions.cs b/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationOptions.cs index bfba1783..3d020ab4 100644 --- a/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationOptions.cs +++ b/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationOptions.cs @@ -9,6 +9,6 @@ namespace OpenIddict.Validation.ServerIntegration; /// /// Provides various settings needed to configure the OpenIddict validation/server integration. /// -public class OpenIddictValidationServerIntegrationOptions +public sealed class OpenIddictValidationServerIntegrationOptions { } diff --git a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpBuilder.cs b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpBuilder.cs index 739d8b3f..b0cc178c 100644 --- a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpBuilder.cs +++ b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpBuilder.cs @@ -15,7 +15,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// /// Exposes the necessary methods required to configure the OpenIddict validation/System.Net.Http integration. /// -public class OpenIddictValidationSystemNetHttpBuilder +public sealed class OpenIddictValidationSystemNetHttpBuilder { /// /// Initializes a new instance of . diff --git a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpConfiguration.cs b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpConfiguration.cs index b2dade82..e207c49d 100644 --- a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpConfiguration.cs +++ b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpConfiguration.cs @@ -13,8 +13,8 @@ namespace OpenIddict.Validation.SystemNetHttp; /// /// Contains the methods required to ensure that the OpenIddict validation/System.Net.Http integration configuration is valid. /// -public class OpenIddictValidationSystemNetHttpConfiguration : IConfigureOptions, - IConfigureNamedOptions +public sealed class OpenIddictValidationSystemNetHttpConfiguration : IConfigureOptions, + IConfigureNamedOptions { #if !SUPPORTS_SERVICE_PROVIDER_IN_HTTP_MESSAGE_HANDLER_BUILDER private readonly IServiceProvider _provider; diff --git a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlerFilters.cs b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlerFilters.cs index 6a84f0d9..d9621b9d 100644 --- a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlerFilters.cs +++ b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlerFilters.cs @@ -14,7 +14,7 @@ public static class OpenIddictValidationSystemNetHttpHandlerFilters /// /// Represents a filter that excludes the associated handlers if the metadata address of the issuer is not available. /// - public class RequireHttpMetadataAddress : IOpenIddictValidationHandlerFilter + public sealed class RequireHttpMetadataAddress : IOpenIddictValidationHandlerFilter { public ValueTask IsActiveAsync(BaseExternalContext context) { diff --git a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.Introspection.cs b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.Introspection.cs index 97c215e6..080505d2 100644 --- a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.Introspection.cs +++ b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.Introspection.cs @@ -39,7 +39,7 @@ public static partial class OpenIddictValidationSystemNetHttpHandlers /// /// Contains the logic responsible for attaching the client credentials to the HTTP Authorization header. /// - public class AttachBasicAuthenticationCredentials : IOpenIddictValidationHandler + public sealed class AttachBasicAuthenticationCredentials : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.cs b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.cs index 22bda167..8063fca9 100644 --- a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.cs +++ b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.cs @@ -29,7 +29,7 @@ public static partial class OpenIddictValidationSystemNetHttpHandlers /// /// Contains the logic responsible for preparing an HTTP GET request message. /// - public class PrepareGetHttpRequest : IOpenIddictValidationHandler where TContext : BaseExternalContext + public sealed class PrepareGetHttpRequest : IOpenIddictValidationHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -61,7 +61,7 @@ public static partial class OpenIddictValidationSystemNetHttpHandlers /// /// Contains the logic responsible for preparing an HTTP POST request message. /// - public class PreparePostHttpRequest : IOpenIddictValidationHandler where TContext : BaseExternalContext + public sealed class PreparePostHttpRequest : IOpenIddictValidationHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -94,7 +94,7 @@ public static partial class OpenIddictValidationSystemNetHttpHandlers /// Contains the logic responsible for attaching the appropriate HTTP /// Accept-* headers to the HTTP request message to receive JSON responses. /// - public class AttachJsonAcceptHeaders : IOpenIddictValidationHandler where TContext : BaseExternalContext + public sealed class AttachJsonAcceptHeaders : IOpenIddictValidationHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -134,7 +134,7 @@ public static partial class OpenIddictValidationSystemNetHttpHandlers /// /// Contains the logic responsible for attaching the user agent to the HTTP request. /// - public class AttachUserAgentHeader : IOpenIddictValidationHandler where TContext : BaseExternalContext + public sealed class AttachUserAgentHeader : IOpenIddictValidationHandler where TContext : BaseExternalContext { private readonly IOptionsMonitor _options; @@ -190,7 +190,7 @@ public static partial class OpenIddictValidationSystemNetHttpHandlers /// /// Contains the logic responsible for attaching the query string parameters to the HTTP request. /// - public class AttachQueryStringParameters : IOpenIddictValidationHandler where TContext : BaseExternalContext + public sealed class AttachQueryStringParameters : IOpenIddictValidationHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -235,7 +235,7 @@ public static partial class OpenIddictValidationSystemNetHttpHandlers /// /// Contains the logic responsible for attaching the form parameters to the HTTP request. /// - public class AttachFormParameters : IOpenIddictValidationHandler where TContext : BaseExternalContext + public sealed class AttachFormParameters : IOpenIddictValidationHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -277,7 +277,7 @@ public static partial class OpenIddictValidationSystemNetHttpHandlers /// /// Contains the logic responsible for sending the HTTP request to the remote server. /// - public class SendHttpRequest : IOpenIddictValidationHandler where TContext : BaseExternalContext + public sealed class SendHttpRequest : IOpenIddictValidationHandler where TContext : BaseExternalContext { private readonly IHttpClientFactory _factory; @@ -355,7 +355,7 @@ public static partial class OpenIddictValidationSystemNetHttpHandlers /// /// Contains the logic responsible for disposing of the HTTP request message. /// - public class DisposeHttpRequest : IOpenIddictValidationHandler where TContext : BaseExternalContext + public sealed class DisposeHttpRequest : IOpenIddictValidationHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -393,7 +393,7 @@ public static partial class OpenIddictValidationSystemNetHttpHandlers /// /// Contains the logic responsible for decompressing the returned HTTP content. /// - public class DecompressResponseContent : IOpenIddictValidationHandler where TContext : BaseExternalContext + public sealed class DecompressResponseContent : IOpenIddictValidationHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -532,7 +532,7 @@ public static partial class OpenIddictValidationSystemNetHttpHandlers /// /// Contains the logic responsible for extracting the response from the JSON-encoded HTTP body. /// - public class ExtractJsonHttpResponse : IOpenIddictValidationHandler where TContext : BaseExternalContext + public sealed class ExtractJsonHttpResponse : IOpenIddictValidationHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -600,7 +600,7 @@ public static partial class OpenIddictValidationSystemNetHttpHandlers /// /// Contains the logic responsible for extracting errors from WWW-Authenticate headers. /// - public class ExtractWwwAuthenticateHeader : IOpenIddictValidationHandler where TContext : BaseExternalContext + public sealed class ExtractWwwAuthenticateHeader : IOpenIddictValidationHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -683,7 +683,7 @@ public static partial class OpenIddictValidationSystemNetHttpHandlers /// /// Contains the logic responsible for extracting errors from WWW-Authenticate headers. /// - public class ValidateHttpResponse : IOpenIddictValidationHandler where TContext : BaseExternalContext + public sealed class ValidateHttpResponse : IOpenIddictValidationHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. @@ -753,7 +753,7 @@ public static partial class OpenIddictValidationSystemNetHttpHandlers /// /// Contains the logic responsible for disposing of the HTTP response message. /// - public class DisposeHttpResponse : IOpenIddictValidationHandler where TContext : BaseExternalContext + public sealed class DisposeHttpResponse : IOpenIddictValidationHandler where TContext : BaseExternalContext { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpOptions.cs b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpOptions.cs index aeb5caf5..7cf158eb 100644 --- a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpOptions.cs +++ b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpOptions.cs @@ -14,7 +14,7 @@ namespace OpenIddict.Validation.SystemNetHttp; /// /// Provides various settings needed to configure the OpenIddict validation/System.Net.Http integration. /// -public class OpenIddictValidationSystemNetHttpOptions +public sealed class OpenIddictValidationSystemNetHttpOptions { /// /// Gets or sets the HTTP Polly error policy used by the internal OpenIddict HTTP clients. diff --git a/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs b/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs index f09c547b..4b6e1125 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs @@ -18,7 +18,7 @@ namespace Microsoft.Extensions.DependencyInjection; /// /// Exposes the necessary methods required to configure the OpenIddict validation services. /// -public class OpenIddictValidationBuilder +public sealed class OpenIddictValidationBuilder { /// /// Initializes a new instance of . @@ -336,7 +336,6 @@ public class OpenIddictValidationBuilder using var store = new X509Store(name, location); store.Open(OpenFlags.ReadOnly); - return AddEncryptionCertificate( store.Certificates.Find(X509FindType.FindByThumbprint, thumbprint, validOnly: false) .OfType() diff --git a/src/OpenIddict.Validation/OpenIddictValidationConfiguration.cs b/src/OpenIddict.Validation/OpenIddictValidationConfiguration.cs index b23dabea..8712451b 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationConfiguration.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationConfiguration.cs @@ -13,7 +13,7 @@ namespace OpenIddict.Validation; /// /// Contains the methods required to ensure that the OpenIddict validation configuration is valid. /// -public class OpenIddictValidationConfiguration : IPostConfigureOptions +public sealed class OpenIddictValidationConfiguration : IPostConfigureOptions { private readonly OpenIddictValidationService _service; diff --git a/src/OpenIddict.Validation/OpenIddictValidationDispatcher.cs b/src/OpenIddict.Validation/OpenIddictValidationDispatcher.cs index 7687b75c..39dc09ff 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationDispatcher.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationDispatcher.cs @@ -9,7 +9,7 @@ using Microsoft.Extensions.Options; namespace OpenIddict.Validation; -public class OpenIddictValidationDispatcher : IOpenIddictValidationDispatcher +public sealed class OpenIddictValidationDispatcher : IOpenIddictValidationDispatcher { private readonly ILogger _logger; private readonly IOptionsMonitor _options; diff --git a/src/OpenIddict.Validation/OpenIddictValidationEvents.Discovery.cs b/src/OpenIddict.Validation/OpenIddictValidationEvents.Discovery.cs index b3075aa0..35c4f64d 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationEvents.Discovery.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationEvents.Discovery.cs @@ -14,7 +14,7 @@ public static partial class OpenIddictValidationEvents /// Represents an event called for each request to the configuration endpoint /// to give the user code a chance to add parameters to the configuration request. /// - public class PrepareConfigurationRequestContext : BaseExternalContext + public sealed class PrepareConfigurationRequestContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -38,7 +38,7 @@ public static partial class OpenIddictValidationEvents /// Represents an event called for each request to the configuration endpoint /// to send the configuration request to the remote authorization server. /// - public class ApplyConfigurationRequestContext : BaseExternalContext + public sealed class ApplyConfigurationRequestContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -62,7 +62,7 @@ public static partial class OpenIddictValidationEvents /// Represents an event called for each configuration response /// to extract the response parameters from the server response. /// - public class ExtractConfigurationResponseContext : BaseExternalContext + public sealed class ExtractConfigurationResponseContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -94,7 +94,7 @@ public static partial class OpenIddictValidationEvents /// /// Represents an event called for each configuration response. /// - public class HandleConfigurationResponseContext : BaseExternalContext + public sealed class HandleConfigurationResponseContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -126,7 +126,7 @@ public static partial class OpenIddictValidationEvents /// Represents an event called for each request to the cryptography endpoint /// to give the user code a chance to add parameters to the cryptography request. /// - public class PrepareCryptographyRequestContext : BaseExternalContext + public sealed class PrepareCryptographyRequestContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -150,7 +150,7 @@ public static partial class OpenIddictValidationEvents /// Represents an event called for each request to the cryptography endpoint /// to send the cryptography request to the remote authorization server. /// - public class ApplyCryptographyRequestContext : BaseExternalContext + public sealed class ApplyCryptographyRequestContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -174,7 +174,7 @@ public static partial class OpenIddictValidationEvents /// Represents an event called for each cryptography response /// to extract the response parameters from the server response. /// - public class ExtractCryptographyResponseContext : BaseExternalContext + public sealed class ExtractCryptographyResponseContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -206,7 +206,7 @@ public static partial class OpenIddictValidationEvents /// /// Represents an event called for each cryptography response. /// - public class HandleCryptographyResponseContext : BaseExternalContext + public sealed class HandleCryptographyResponseContext : BaseExternalContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Validation/OpenIddictValidationEvents.Introspection.cs b/src/OpenIddict.Validation/OpenIddictValidationEvents.Introspection.cs index beb0156f..9e8ad3bf 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationEvents.Introspection.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationEvents.Introspection.cs @@ -14,7 +14,7 @@ public static partial class OpenIddictValidationEvents /// Represents an event called for each request to the introspection endpoint /// to give the user code a chance to add parameters to the introspection request. /// - public class PrepareIntrospectionRequestContext : BaseExternalContext + public sealed class PrepareIntrospectionRequestContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -48,7 +48,7 @@ public static partial class OpenIddictValidationEvents /// Represents an event called for each request to the introspection endpoint /// to send the introspection request to the remote authorization server. /// - public class ApplyIntrospectionRequestContext : BaseExternalContext + public sealed class ApplyIntrospectionRequestContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -72,7 +72,7 @@ public static partial class OpenIddictValidationEvents /// Represents an event called for each introspection response /// to extract the response parameters from the server response. /// - public class ExtractIntrospectionResponseContext : BaseExternalContext + public sealed class ExtractIntrospectionResponseContext : BaseExternalContext { /// /// Creates a new instance of the class. @@ -104,7 +104,7 @@ public static partial class OpenIddictValidationEvents /// /// Represents an event called for each introspection response. /// - public class HandleIntrospectionResponseContext : BaseExternalContext + public sealed class HandleIntrospectionResponseContext : BaseExternalContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Validation/OpenIddictValidationEvents.Protection.cs b/src/OpenIddict.Validation/OpenIddictValidationEvents.Protection.cs index 3f8743d8..6d7f4edc 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationEvents.Protection.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationEvents.Protection.cs @@ -15,7 +15,7 @@ public static partial class OpenIddictValidationEvents /// /// Represents an event called when validating a token. /// - public class ValidateTokenContext : BaseValidatingContext + public sealed class ValidateTokenContext : BaseValidatingContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Validation/OpenIddictValidationEvents.cs b/src/OpenIddict.Validation/OpenIddictValidationEvents.cs index 3d3bc40d..e97f07a3 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationEvents.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationEvents.cs @@ -179,7 +179,7 @@ public static partial class OpenIddictValidationEvents /// /// Represents an event called when processing an incoming request. /// - public class ProcessRequestContext : BaseValidatingContext + public sealed class ProcessRequestContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -193,7 +193,7 @@ public static partial class OpenIddictValidationEvents /// /// Represents an event called when processing an errored response. /// - public class ProcessErrorContext : BaseRequestContext + public sealed class ProcessErrorContext : BaseRequestContext { /// /// Creates a new instance of the class. @@ -245,7 +245,7 @@ public static partial class OpenIddictValidationEvents /// /// Represents an event called when processing an authentication operation. /// - public class ProcessAuthenticationContext : BaseValidatingContext + public sealed class ProcessAuthenticationContext : BaseValidatingContext { /// /// Creates a new instance of the class. @@ -302,7 +302,7 @@ public static partial class OpenIddictValidationEvents /// /// Represents an event called when processing a challenge response. /// - public class ProcessChallengeContext : BaseValidatingContext + public sealed class ProcessChallengeContext : BaseValidatingContext { /// /// Creates a new instance of the class. diff --git a/src/OpenIddict.Validation/OpenIddictValidationFactory.cs b/src/OpenIddict.Validation/OpenIddictValidationFactory.cs index 773f7e5c..cd892048 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationFactory.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationFactory.cs @@ -9,7 +9,7 @@ using Microsoft.Extensions.Options; namespace OpenIddict.Validation; -public class OpenIddictValidationFactory : IOpenIddictValidationFactory +public sealed class OpenIddictValidationFactory : IOpenIddictValidationFactory { private readonly ILogger _logger; private readonly IOptionsMonitor _options; diff --git a/src/OpenIddict.Validation/OpenIddictValidationHandler.cs b/src/OpenIddict.Validation/OpenIddictValidationHandler.cs index c193e1c5..ac1e0c99 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationHandler.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationHandler.cs @@ -10,7 +10,7 @@ namespace OpenIddict.Validation; /// Represents a handler able to process events. /// /// The type of the events handled by this instance. -public class OpenIddictValidationHandler : IOpenIddictValidationHandler where TContext : BaseContext +public sealed class OpenIddictValidationHandler : IOpenIddictValidationHandler where TContext : BaseContext { private readonly Func _handler; diff --git a/src/OpenIddict.Validation/OpenIddictValidationHandlerDescriptor.cs b/src/OpenIddict.Validation/OpenIddictValidationHandlerDescriptor.cs index 7436f7a6..d791f34c 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationHandlerDescriptor.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationHandlerDescriptor.cs @@ -15,7 +15,7 @@ namespace OpenIddict.Validation; /// Represents an immutable descriptor of an OpenIddict validation event handler. /// [DebuggerDisplay("{ServiceDescriptor?.ServiceType}")] -public class OpenIddictValidationHandlerDescriptor +public sealed class OpenIddictValidationHandlerDescriptor { /// /// Creates a new instance of the class. @@ -60,7 +60,7 @@ public class OpenIddictValidationHandlerDescriptor /// Contains methods allowing to build a descriptor instance. /// /// The event context type. - public class Builder where TContext : BaseContext + public sealed class Builder where TContext : BaseContext { private ServiceDescriptor? _descriptor; private readonly List _filters = new(); diff --git a/src/OpenIddict.Validation/OpenIddictValidationHandlerFilters.cs b/src/OpenIddict.Validation/OpenIddictValidationHandlerFilters.cs index 727f9fb1..ea74b34f 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationHandlerFilters.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationHandlerFilters.cs @@ -14,7 +14,7 @@ public static class OpenIddictValidationHandlerFilters /// /// Represents a filter that excludes the associated handlers if no access token is extracted. /// - public class RequireAccessTokenExtracted : IOpenIddictValidationHandlerFilter + public sealed class RequireAccessTokenExtracted : IOpenIddictValidationHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -30,7 +30,7 @@ public static class OpenIddictValidationHandlerFilters /// /// Represents a filter that excludes the associated handlers if no access token is validated. /// - public class RequireAccessTokenValidated : IOpenIddictValidationHandlerFilter + public sealed class RequireAccessTokenValidated : IOpenIddictValidationHandlerFilter { public ValueTask IsActiveAsync(ProcessAuthenticationContext context) { @@ -46,7 +46,7 @@ public static class OpenIddictValidationHandlerFilters /// /// Represents a filter that excludes the associated handlers if authorization validation was not enabled. /// - public class RequireAuthorizationEntryValidationEnabled : IOpenIddictValidationHandlerFilter + public sealed class RequireAuthorizationEntryValidationEnabled : IOpenIddictValidationHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -62,7 +62,7 @@ public static class OpenIddictValidationHandlerFilters /// /// Represents a filter that excludes the associated handlers if local validation is not used. /// - public class RequireLocalValidation : IOpenIddictValidationHandlerFilter + public sealed class RequireLocalValidation : IOpenIddictValidationHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -78,7 +78,7 @@ public static class OpenIddictValidationHandlerFilters /// /// Represents a filter that excludes the associated handlers if introspection is not used. /// - public class RequireIntrospectionValidation : IOpenIddictValidationHandlerFilter + public sealed class RequireIntrospectionValidation : IOpenIddictValidationHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { @@ -94,7 +94,7 @@ public static class OpenIddictValidationHandlerFilters /// /// Represents a filter that excludes the associated handlers if token validation was not enabled. /// - public class RequireTokenEntryValidationEnabled : IOpenIddictValidationHandlerFilter + public sealed class RequireTokenEntryValidationEnabled : IOpenIddictValidationHandlerFilter { public ValueTask IsActiveAsync(BaseContext context) { diff --git a/src/OpenIddict.Validation/OpenIddictValidationHandlers.Discovery.cs b/src/OpenIddict.Validation/OpenIddictValidationHandlers.Discovery.cs index f53886a3..bb99f3df 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationHandlers.Discovery.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationHandlers.Discovery.cs @@ -36,7 +36,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for validating the well-known parameters contained in the configuration response. /// - public class ValidateWellKnownConfigurationParameters : IOpenIddictValidationHandler + public sealed class ValidateWellKnownConfigurationParameters : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -116,7 +116,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for surfacing potential errors from the configuration response. /// - public class HandleConfigurationErrorResponse : IOpenIddictValidationHandler + public sealed class HandleConfigurationErrorResponse : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -159,7 +159,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for extracting the issuer from the discovery document. /// - public class ValidateIssuer : IOpenIddictValidationHandler + public sealed class ValidateIssuer : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -222,7 +222,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for extracting the JWKS endpoint address from the discovery document. /// - public class ExtractCryptographyEndpoint : IOpenIddictValidationHandler + public sealed class ExtractCryptographyEndpoint : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -274,7 +274,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for extracting the introspection endpoint address from the discovery document. /// - public class ExtractIntrospectionEndpoint : IOpenIddictValidationHandler + public sealed class ExtractIntrospectionEndpoint : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -318,7 +318,7 @@ public static partial class OpenIddictValidationHandlers /// Contains the logic responsible for extracting the authentication methods /// supported by the introspection endpoint from the discovery document. /// - public class ExtractIntrospectionEndpointClientAuthenticationMethods : IOpenIddictValidationHandler + public sealed class ExtractIntrospectionEndpointClientAuthenticationMethods : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -360,7 +360,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for validating the well-known parameters contained in the JWKS response. /// - public class ValidateWellKnownCryptographyParameters : IOpenIddictValidationHandler + public sealed class ValidateWellKnownCryptographyParameters : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -434,7 +434,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for surfacing potential errors from the cryptography response. /// - public class HandleCryptographyErrorResponse : IOpenIddictValidationHandler + public sealed class HandleCryptographyErrorResponse : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -477,7 +477,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for extracting the signing keys from the JWKS document. /// - public class ExtractSigningKeys : IOpenIddictValidationHandler + public sealed class ExtractSigningKeys : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Validation/OpenIddictValidationHandlers.Introspection.cs b/src/OpenIddict.Validation/OpenIddictValidationHandlers.Introspection.cs index 71a66f85..aed91220 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationHandlers.Introspection.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationHandlers.Introspection.cs @@ -35,7 +35,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for attaching the client credentials to the introspection request. /// - public class AttachCredentials : IOpenIddictValidationHandler + public sealed class AttachCredentials : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -65,7 +65,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for attaching the token to the introspection request. /// - public class AttachToken : IOpenIddictValidationHandler + public sealed class AttachToken : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -95,7 +95,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for validating the well-known parameters contained in the introspection response. /// - public class ValidateWellKnownParameters : IOpenIddictValidationHandler + public sealed class ValidateWellKnownParameters : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -183,7 +183,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for surfacing potential errors from the introspection response. /// - public class HandleErrorResponse : IOpenIddictValidationHandler + public sealed class HandleErrorResponse : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -229,7 +229,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for extracting the active: false marker from the response. /// - public class HandleInactiveResponse : IOpenIddictValidationHandler + public sealed class HandleInactiveResponse : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -282,7 +282,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for extracting the issuer from the introspection response. /// - public class ValidateIssuer : IOpenIddictValidationHandler + public sealed class ValidateIssuer : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -335,7 +335,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for extracting and validating the token usage from the introspection response. /// - public class ValidateTokenUsage : IOpenIddictValidationHandler + public sealed class ValidateTokenUsage : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -394,7 +394,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for extracting the claims from the introspection response. /// - public class PopulateClaims : IOpenIddictValidationHandler + public sealed class PopulateClaims : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Validation/OpenIddictValidationHandlers.Protection.cs b/src/OpenIddict.Validation/OpenIddictValidationHandlers.Protection.cs index 9aa3e84b..7c04c6f7 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationHandlers.Protection.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationHandlers.Protection.cs @@ -38,7 +38,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for resolving the validation parameters used to validate tokens. /// - public class ResolveTokenValidationParameters : IOpenIddictValidationHandler + public sealed class ResolveTokenValidationParameters : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -117,7 +117,7 @@ public static partial class OpenIddictValidationHandlers /// Contains the logic responsible for validating reference token identifiers. /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateReferenceTokenIdentifier : IOpenIddictValidationHandler + public sealed class ValidateReferenceTokenIdentifier : IOpenIddictValidationHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -193,7 +193,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for validating tokens generated using IdentityModel. /// - public class ValidateIdentityModelToken : IOpenIddictValidationHandler + public sealed class ValidateIdentityModelToken : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -282,7 +282,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for validating the tokens using OAuth 2.0 introspection. /// - public class IntrospectToken : IOpenIddictValidationHandler + public sealed class IntrospectToken : IOpenIddictValidationHandler { private readonly OpenIddictValidationService _service; @@ -383,7 +383,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for normalizing the scope claims stored in the tokens. /// - public class NormalizeScopeClaims : IOpenIddictValidationHandler + public sealed class NormalizeScopeClaims : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -428,7 +428,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for mapping internal claims used by OpenIddict. /// - public class MapInternalClaims : IOpenIddictValidationHandler + public sealed class MapInternalClaims : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -532,7 +532,7 @@ public static partial class OpenIddictValidationHandlers /// Contains the logic responsible for restoring the properties associated with a reference token entry. /// Note: this handler is not used when the degraded mode is enabled. /// - public class RestoreReferenceTokenProperties : IOpenIddictValidationHandler + public sealed class RestoreReferenceTokenProperties : IOpenIddictValidationHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -581,7 +581,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for rejecting authentication demands for which no valid principal was resolved. /// - public class ValidatePrincipal : IOpenIddictValidationHandler + public sealed class ValidatePrincipal : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -633,7 +633,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for rejecting authentication demands containing expired access tokens. /// - public class ValidateExpirationDate : IOpenIddictValidationHandler + public sealed class ValidateExpirationDate : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -676,7 +676,7 @@ public static partial class OpenIddictValidationHandlers /// Contains the logic responsible for rejecting authentication demands containing /// access tokens that were issued to be used by another audience/resource server. /// - public class ValidateAudience : IOpenIddictValidationHandler + public sealed class ValidateAudience : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -741,7 +741,7 @@ public static partial class OpenIddictValidationHandlers /// associated token entry is no longer valid (e.g was revoked). /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateTokenEntry : IOpenIddictValidationHandler + public sealed class ValidateTokenEntry : IOpenIddictValidationHandler { private readonly IOpenIddictTokenManager _tokenManager; @@ -805,7 +805,7 @@ public static partial class OpenIddictValidationHandlers /// associated authorization entry is no longer valid (e.g was revoked). /// Note: this handler is not used when the degraded mode is enabled. /// - public class ValidateAuthorizationEntry : IOpenIddictValidationHandler + public sealed class ValidateAuthorizationEntry : IOpenIddictValidationHandler { private readonly IOpenIddictAuthorizationManager _authorizationManager; diff --git a/src/OpenIddict.Validation/OpenIddictValidationHandlers.cs b/src/OpenIddict.Validation/OpenIddictValidationHandlers.cs index 4bdcb4fd..bb42740d 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationHandlers.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationHandlers.cs @@ -40,7 +40,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for resolving the server configuration. /// - public class ResolveServerConfiguration : IOpenIddictValidationHandler + public sealed class ResolveServerConfiguration : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -76,7 +76,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for selecting the token types that should be validated. /// - public class EvaluateValidatedTokens : IOpenIddictValidationHandler + public sealed class EvaluateValidatedTokens : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -119,7 +119,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for rejecting authentication demands that lack required tokens. /// - public class ValidateRequiredTokens : IOpenIddictValidationHandler + public sealed class ValidateRequiredTokens : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -158,7 +158,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for ensuring a token was correctly resolved from the context. /// - public class ValidateAccessToken : IOpenIddictValidationHandler + public sealed class ValidateAccessToken : IOpenIddictValidationHandler { private readonly IOpenIddictValidationDispatcher _dispatcher; @@ -225,7 +225,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for ensuring that the challenge response contains an appropriate error. /// - public class AttachDefaultChallengeError : IOpenIddictValidationHandler + public sealed class AttachDefaultChallengeError : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -267,7 +267,7 @@ public static partial class OpenIddictValidationHandlers /// Contains the logic responsible for attaching the parameters /// populated from user-defined handlers to the sign-out response. /// - public class AttachCustomChallengeParameters : IOpenIddictValidationHandler + public sealed class AttachCustomChallengeParameters : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -302,7 +302,7 @@ public static partial class OpenIddictValidationHandlers /// /// Contains the logic responsible for attaching the appropriate parameters to the error response. /// - public class AttachErrorParameters : IOpenIddictValidationHandler + public sealed class AttachErrorParameters : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. @@ -334,7 +334,7 @@ public static partial class OpenIddictValidationHandlers /// Contains the logic responsible for attaching the parameters /// populated from user-defined handlers to the error response. /// - public class AttachCustomErrorParameters : IOpenIddictValidationHandler + public sealed class AttachCustomErrorParameters : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. diff --git a/src/OpenIddict.Validation/OpenIddictValidationOptions.cs b/src/OpenIddict.Validation/OpenIddictValidationOptions.cs index 76be8091..7a1b69ec 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationOptions.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationOptions.cs @@ -13,7 +13,7 @@ namespace OpenIddict.Validation; /// /// Provides various settings needed to configure the OpenIddict validation handler. /// -public class OpenIddictValidationOptions +public sealed class OpenIddictValidationOptions { /// /// Gets the list of encryption credentials used by the OpenIddict validation services. diff --git a/src/OpenIddict.Validation/OpenIddictValidationRetriever.cs b/src/OpenIddict.Validation/OpenIddictValidationRetriever.cs index d07f0d24..fe15dcb9 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationRetriever.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationRetriever.cs @@ -9,7 +9,7 @@ using Microsoft.IdentityModel.Protocols; namespace OpenIddict.Validation; -public class OpenIddictValidationRetriever : IConfigurationRetriever +public sealed class OpenIddictValidationRetriever : IConfigurationRetriever { private readonly OpenIddictValidationService _service; diff --git a/src/OpenIddict.Validation/OpenIddictValidationService.cs b/src/OpenIddict.Validation/OpenIddictValidationService.cs index 0568ec8b..546af2c3 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationService.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationService.cs @@ -13,7 +13,7 @@ using static OpenIddict.Abstractions.OpenIddictExceptions; namespace OpenIddict.Validation; -public class OpenIddictValidationService +public sealed class OpenIddictValidationService { private readonly IServiceProvider _provider; diff --git a/src/OpenIddict.Validation/OpenIddictValidationTransaction.cs b/src/OpenIddict.Validation/OpenIddictValidationTransaction.cs index 4f9be43d..dc01366d 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationTransaction.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationTransaction.cs @@ -11,7 +11,7 @@ namespace OpenIddict.Validation; /// /// Represents the context associated with an OpenID Connect validation request. /// -public class OpenIddictValidationTransaction +public sealed class OpenIddictValidationTransaction { /// /// Gets or sets the type of the endpoint processing the current request.