diff --git a/.vscode/launch.json b/.vscode/launch.json index 2006f0792..478b27afe 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -28,7 +28,7 @@ "name": "host: main (dotnet 8)", "type": "coreclr", "request": "launch", - "preLaunchTask": "build-host-main", + "preLaunchTask": "build-host-main-8", "program": "${workspaceFolder}/hosts/main/bin/Debug/net8.0/Host.Main.dll", "args": [], "cwd": "${workspaceFolder}/hosts/main", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 511bb7963..79d42bb8e 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -20,12 +20,26 @@ //------- // Hosts //------- + { + "label": "build-host-main-8", + "type": "process", + "command": "dotnet", + "args": [ + "build", + "--framework=net8.0", + "${workspaceFolder}/hosts/main/Host.Main.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, { "label": "build-host-main", "type": "process", "command": "dotnet", "args": [ "build", + "--framework=net9.0", "${workspaceFolder}/hosts/main/Host.Main.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" diff --git a/hosts/main/IdentityServerExtensions.cs b/hosts/main/IdentityServerExtensions.cs index de1097ea1..6510f7a4e 100644 --- a/hosts/main/IdentityServerExtensions.cs +++ b/hosts/main/IdentityServerExtensions.cs @@ -38,7 +38,7 @@ internal static WebApplicationBuilder ConfigureIdentityServer(this WebApplicatio UseX509Certificate = true }); }) - //.AddServerSideSessions() + .AddServerSideSessions() .AddInMemoryClients(Clients.Get().ToList()) .AddInMemoryIdentityResources(Resources.IdentityResources) .AddInMemoryApiScopes(Resources.ApiScopes) @@ -64,7 +64,8 @@ internal static WebApplicationBuilder ConfigureIdentityServer(this WebApplicatio ResponseType = "id_token", Scope = "openid profile" } - ]); + ]) + .AddLicenseSummary(); builder.Services.AddDistributedMemoryCache(); diff --git a/hosts/main/Program.cs b/hosts/main/Program.cs index d2762d576..0823abede 100644 --- a/hosts/main/Program.cs +++ b/hosts/main/Program.cs @@ -1,6 +1,7 @@ // Copyright (c) Duende Software. All rights reserved. // See LICENSE in the project root for license information. +using Duende.IdentityServer.Licensing.v2; using IdentityServerHost; using Serilog; using Serilog.Events; @@ -36,7 +37,11 @@ .ConfigureServices() .ConfigurePipeline(); + var license = app.Services.GetRequiredService(); + app.Run(); + + Console.Write(license.Summary); } catch (Exception ex) { diff --git a/src/IdentityServer/Configuration/DependencyInjection/BuilderExtensions/Core.cs b/src/IdentityServer/Configuration/DependencyInjection/BuilderExtensions/Core.cs index 129724c46..63a168de4 100644 --- a/src/IdentityServer/Configuration/DependencyInjection/BuilderExtensions/Core.cs +++ b/src/IdentityServer/Configuration/DependencyInjection/BuilderExtensions/Core.cs @@ -210,7 +210,6 @@ public static IIdentityServerBuilder AddCoreServices(this IIdentityServerBuilder builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); - builder.Services.AddHostedService(); return builder; } @@ -398,6 +397,15 @@ public static IIdentityServerBuilder AddDefaultSecretValidators(this IIdentitySe return builder; } + /// + /// Adds the license summary, which provides information about the current license usage. + /// + public static IIdentityServerBuilder AddLicenseSummary(this IIdentityServerBuilder builder) + { + builder.Services.AddSingleton(); + return builder; + } + internal static void AddTransientDecorator(this IServiceCollection services) where TService : class where TImplementation : class, TService diff --git a/src/IdentityServer/Configuration/DependencyInjection/PostConfigureApplicationCookieTicketStore.cs b/src/IdentityServer/Configuration/DependencyInjection/PostConfigureApplicationCookieTicketStore.cs index 4f909a1ea..7e3378cbc 100644 --- a/src/IdentityServer/Configuration/DependencyInjection/PostConfigureApplicationCookieTicketStore.cs +++ b/src/IdentityServer/Configuration/DependencyInjection/PostConfigureApplicationCookieTicketStore.cs @@ -29,18 +29,16 @@ public class PostConfigureApplicationCookieTicketStore : IPostConfigureOptions /// /// - /// /// /// public PostConfigureApplicationCookieTicketStore( IHttpContextAccessor httpContextAccessor, IdentityServerOptions identityServerOptions, - ILicenseUsageService licenseUsage, IOptions options, ILogger logger) { _httpContextAccessor = httpContextAccessor; - _licenseUsage = licenseUsage; + _licenseUsage = httpContextAccessor.HttpContext?.RequestServices.GetRequiredService(); _logger = logger; _scheme = identityServerOptions.Authentication.CookieAuthenticationScheme ?? diff --git a/src/IdentityServer/Hosting/IdentityServerMiddleware.cs b/src/IdentityServer/Hosting/IdentityServerMiddleware.cs index e78698d74..013152b6b 100644 --- a/src/IdentityServer/Hosting/IdentityServerMiddleware.cs +++ b/src/IdentityServer/Hosting/IdentityServerMiddleware.cs @@ -13,6 +13,7 @@ using System.Linq; using Duende.IdentityServer.Configuration; using Duende.IdentityServer.Licensing.v2; +using Microsoft.Extensions.DependencyInjection; namespace Duende.IdentityServer.Hosting; @@ -45,7 +46,6 @@ public IdentityServerMiddleware(RequestDelegate next, ILoggerThe event service. /// The issuer name service /// - /// /// public async Task Invoke( HttpContext context, @@ -54,8 +54,7 @@ public async Task Invoke( IUserSession userSession, IEventService events, IIssuerNameService issuerNameService, - ISessionCoordinationService sessionCoordinationService, - ILicenseUsageService licenseUsage) + ISessionCoordinationService sessionCoordinationService) { // this will check the authentication session and from it emit the check session // cookie needed from JS-based signout clients. @@ -101,6 +100,7 @@ public async Task Invoke( activity?.SetTag(Tracing.Properties.EndpointType, endpointType); var issuer = await issuerNameService.GetCurrentAsync(); + var licenseUsage = context.RequestServices.GetRequiredService(); licenseUsage.UseIssuer(issuer); IdentityServerLicenseValidator.Instance.ValidateIssuer(issuer); diff --git a/src/IdentityServer/Licensing/v2/ILicenseAccessor.cs b/src/IdentityServer/Licensing/v2/ILicenseAccessor.cs index 240d7e340..2ebd3257e 100644 --- a/src/IdentityServer/Licensing/v2/ILicenseAccessor.cs +++ b/src/IdentityServer/Licensing/v2/ILicenseAccessor.cs @@ -8,7 +8,7 @@ namespace Duende.IdentityServer.Licensing.v2; /// /// Provides access to the current License. /// -public interface ILicenseAccessor +internal interface ILicenseAccessor { /// /// Gets the current IdentityServer license. diff --git a/src/IdentityServer/Licensing/v2/ILicenseSummary.cs b/src/IdentityServer/Licensing/v2/ILicenseSummary.cs new file mode 100644 index 000000000..227675ada --- /dev/null +++ b/src/IdentityServer/Licensing/v2/ILicenseSummary.cs @@ -0,0 +1,49 @@ +// Copyright (c) Duende Software. All rights reserved. +// See LICENSE in the project root for license information. + +#nullable enable + +using System.Collections.Generic; + +namespace Duende.IdentityServer.Licensing.v2; + +/// +/// Summarizes the usage of IdentityServer +/// +public interface ILicenseSummary +{ + /// + /// Summarizes the usage of IdentityServer, including licensed features, clients, and issuers. + /// + public string Summary { get; } + + /// + /// Gets the license edition. + /// + public string LicenseEdition { get; } + + /// + /// Gets the licensed enterprise edition features that have been used. + /// + IEnumerable EnterpriseFeaturesUsed { get; } + + /// + /// Gets the licensed business edition features that have been used. + /// + IEnumerable BusinessFeaturesUsed { get; } + + /// + /// Gets other licensed features that have been used. + /// + IEnumerable OtherFeaturesUsed { get; } + + /// + /// Gets the client ids that have been used. + /// + IEnumerable UsedClients { get; } + + /// + /// Gets the issuers that have been used. + /// + IEnumerable UsedIssuers { get; } +} diff --git a/src/IdentityServer/Licensing/v2/ILicenseUsageService.cs b/src/IdentityServer/Licensing/v2/ILicenseUsageService.cs index eaca42803..89ab33e35 100644 --- a/src/IdentityServer/Licensing/v2/ILicenseUsageService.cs +++ b/src/IdentityServer/Licensing/v2/ILicenseUsageService.cs @@ -10,12 +10,23 @@ namespace Duende.IdentityServer.Licensing.v2; /// /// Tracks the usage of the license. /// -public interface ILicenseUsageService +internal interface ILicenseUsageService { /// - /// Gets the licensed features that have been used. + /// Gets the licensed business edition features that have been used. /// - HashSet UsedFeatures { get; } + HashSet BusinessFeaturesUsed { get; } + + /// + /// Gets the licensed enterprise edition features that have been used. + /// + HashSet EnterpriseFeaturesUsed { get; } + + /// + /// Gets other licensed features that have been used. + /// + HashSet OtherFeaturesUsed { get; } + /// /// Indicates that a licensed feature has been used. /// diff --git a/src/IdentityServer/Licensing/v2/License.cs b/src/IdentityServer/Licensing/v2/License.cs index bf97677d9..315663635 100644 --- a/src/IdentityServer/Licensing/v2/License.cs +++ b/src/IdentityServer/Licensing/v2/License.cs @@ -14,7 +14,7 @@ namespace Duende.IdentityServer.Licensing.v2; /// /// Models a Duende commercial license. /// -public sealed class License +internal class License // TODO - make this internal, and consider a public type that constrains what we show externally { /// diff --git a/src/IdentityServer/Licensing/v2/LicenseEdition.cs b/src/IdentityServer/Licensing/v2/LicenseEdition.cs index 8f67aa0dd..bf93f57ed 100644 --- a/src/IdentityServer/Licensing/v2/LicenseEdition.cs +++ b/src/IdentityServer/Licensing/v2/LicenseEdition.cs @@ -6,7 +6,7 @@ namespace Duende.IdentityServer.Licensing.v2; /// /// The editions of our license, which give access to different features. /// -public enum LicenseEdition +internal enum LicenseEdition { /// /// Enterprise license edition diff --git a/src/IdentityServer/Licensing/v2/LicenseFeature.cs b/src/IdentityServer/Licensing/v2/LicenseFeature.cs index cbac54e7b..add30e3a3 100644 --- a/src/IdentityServer/Licensing/v2/LicenseFeature.cs +++ b/src/IdentityServer/Licensing/v2/LicenseFeature.cs @@ -9,7 +9,7 @@ namespace Duende.IdentityServer.Licensing.v2; /// /// The features of IdentityServer that can be enabled or disabled through the License. /// -public enum LicenseFeature : ulong +internal enum LicenseFeature : ulong { /// /// Automatic Key Management @@ -48,7 +48,7 @@ public enum LicenseFeature : ulong ServerSideSessions = 32, /// - /// Demonstrating Proof of Possesion + /// Demonstrating Proof of Possession /// [Description("dpop")] DPoP = 64, diff --git a/src/IdentityServer/Licensing/v2/LicenseSummary.cs b/src/IdentityServer/Licensing/v2/LicenseSummary.cs new file mode 100644 index 000000000..34f2b3527 --- /dev/null +++ b/src/IdentityServer/Licensing/v2/LicenseSummary.cs @@ -0,0 +1,51 @@ +// Copyright (c) Duende Software. All rights reserved. +// See LICENSE in the project root for license information. + +#nullable enable + +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Duende.IdentityServer.Licensing.v2; + +internal class LicenseSummary(ILicenseAccessor license, ILicenseUsageService usage) : ILicenseSummary +{ + public string Summary + { + get + { + var sb = new StringBuilder(); + sb.AppendLine("IdentityServer Usage Summary:"); + sb.AppendLine($"\tLicense: {LicenseEdition}"); + + AppendSummary(sb, "Client Ids Used", usage.UsedClients); + AppendSummary(sb, "Business Edition Features Used", usage.BusinessFeaturesUsed); + AppendSummary(sb, "Enterprise Edition Features Used", usage.EnterpriseFeaturesUsed); + AppendSummary(sb, "Other Features Used", usage.OtherFeaturesUsed); + AppendSummary(sb, "Issuers Used", usage.UsedIssuers); + + return sb.ToString(); + } + } + + private void AppendSummary(StringBuilder sb, string label, IReadOnlyCollection items) + { + if (items.Count == 1) + { + sb.AppendLine($"\t{label}: {items.Single()}"); + } + else if (items.Count > 1) + { + sb.AppendLine($"\t{label}s: {string.Join(", ", items)}"); + } + } + + public string LicenseEdition => license.Current.Edition?.ToString() ?? "None"; + public IEnumerable UsedClients => usage.UsedClients; + public IEnumerable UsedIssuers => usage.UsedIssuers; + + public IEnumerable EnterpriseFeaturesUsed => usage.EnterpriseFeaturesUsed.Select(f => f.ToString()); + public IEnumerable BusinessFeaturesUsed => usage.BusinessFeaturesUsed.Select(f => f.ToString()); + public IEnumerable OtherFeaturesUsed => usage.OtherFeaturesUsed.Select(f => f.ToString()); +} diff --git a/src/IdentityServer/Licensing/v2/LicenseUsageService.cs b/src/IdentityServer/Licensing/v2/LicenseUsageService.cs index f907bfeae..9ab8e6913 100644 --- a/src/IdentityServer/Licensing/v2/LicenseUsageService.cs +++ b/src/IdentityServer/Licensing/v2/LicenseUsageService.cs @@ -4,7 +4,6 @@ #nullable enable using System.Collections.Generic; -using System.Linq; namespace Duende.IdentityServer.Licensing.v2; @@ -38,9 +37,34 @@ private void EnsureAdded(ref HashSet hashSet, object lockObject, T key) // Features private readonly object _featureLock = new(); - private HashSet _features = new(); - public HashSet UsedFeatures => _features; - public void UseFeature(LicenseFeature feature) => EnsureAdded(ref _features, _featureLock, feature); + private HashSet _otherFeatures = new(); + private HashSet _businessFeatures = new(); + private HashSet _enterpriseFeatures = new(); + public HashSet BusinessFeaturesUsed => _businessFeatures; + public HashSet EnterpriseFeaturesUsed => _enterpriseFeatures; + public HashSet OtherFeaturesUsed => _otherFeatures; + public void UseFeature(LicenseFeature feature) + { + switch (feature) + { + case LicenseFeature.ResourceIsolation: + case LicenseFeature.DynamicProviders: + case LicenseFeature.CIBA: + case LicenseFeature.DPoP: + EnsureAdded(ref _enterpriseFeatures, _featureLock, feature); + break; + case LicenseFeature.KeyManagement: + case LicenseFeature.PAR: + case LicenseFeature.ServerSideSessions: + case LicenseFeature.DCR: + EnsureAdded(ref _businessFeatures, _featureLock, feature); + break; + case LicenseFeature.ISV: + case LicenseFeature.Redistribution: + EnsureAdded(ref _otherFeatures, _featureLock, feature); + break; + } + } // Clients private readonly object _clientLock = new(); @@ -52,5 +76,6 @@ private void EnsureAdded(ref HashSet hashSet, object lockObject, T key) private readonly object _issuerLock = new(); private HashSet _issuers = new(); public HashSet UsedIssuers => _issuers; + public void UseIssuer(string issuer) => EnsureAdded(ref _issuers, _issuerLock, issuer); } diff --git a/src/IdentityServer/Licensing/v2/UsageSummaryService.cs b/src/IdentityServer/Licensing/v2/UsageSummaryService.cs deleted file mode 100644 index 0b2f75e3a..000000000 --- a/src/IdentityServer/Licensing/v2/UsageSummaryService.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; - -namespace Duende.IdentityServer.Licensing.v2; - -/// -/// -/// -public class UsageSummaryService(ILicenseAccessor license, ILicenseUsageService licenseUsage, ILogger logger) : IHostedService -{ - /// - /// - /// - public Task StartAsync(CancellationToken cancellationToken) - { - return Task.CompletedTask; - } - - /// - /// - /// - public Task StopAsync(CancellationToken cancellationToken) - { - if (!license.Current.IsConfigured) - { - var features = licenseUsage.UsedFeatures.ToArray(); - var clients = licenseUsage.UsedClients.ToArray(); - var issuers = licenseUsage.UsedIssuers.ToArray(); - logger.LogInformation(message: "Thank you for trying IdentityServer! A license is required in production. To help you choose the right license, here is a summary of your usage of IdentityServer. {clientCount} Client(s): {clients}. Features: {features}. {issuerCount} Issuer(s): {issuers}", - clients.Length, - string.Join(',', clients), - string.Join(',', features), - issuers.Length, - string.Join(',', issuers)); - } - return Task.CompletedTask; - } -} diff --git a/test/IdentityServer.IntegrationTests/Extensibility/LicensingCustomizationTests.cs b/test/IdentityServer.IntegrationTests/Extensibility/LicensingCustomizationTests.cs index 6a5f4bd2e..0046e6e88 100644 --- a/test/IdentityServer.IntegrationTests/Extensibility/LicensingCustomizationTests.cs +++ b/test/IdentityServer.IntegrationTests/Extensibility/LicensingCustomizationTests.cs @@ -66,13 +66,20 @@ public void Increment() internal class CustomFeatureManager : ILicenseUsageService { - public HashSet UsedFeatures { get; } = new(); - - public void UseFeature(LicenseFeature feature) => UsedFeatures.Add(feature); + public HashSet BusinessFeaturesUsed { get; } = []; + public HashSet EnterpriseFeaturesUsed { get; } = []; + public HashSet OtherFeaturesUsed { get; } = []; + public void UseFeature(LicenseFeature feature) + { + } - public HashSet UsedClients { get; } = new(); - public void UseClient(string clientId) => UsedClients.Add(clientId); + public HashSet UsedClients { get; } = []; + public void UseClient(string clientId) + { + } - public HashSet UsedIssuers { get; } = new(); - public void UseIssuer(string issuer) => UsedIssuers.Add(issuer); + public HashSet UsedIssuers { get; } = []; + public void UseIssuer(string issuer) + { + } } \ No newline at end of file diff --git a/test/IdentityServer.UnitTests/Common/TestFeatureManager.cs b/test/IdentityServer.UnitTests/Common/TestFeatureManager.cs deleted file mode 100644 index 5e603c42d..000000000 --- a/test/IdentityServer.UnitTests/Common/TestFeatureManager.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Duende Software. All rights reserved. -// See LICENSE in the project root for license information. - - -using Duende.IdentityServer.Licensing.v2; -using System.Collections.Generic; - -namespace UnitTests.Common; - -internal class TestFeatureManager : ILicenseUsageService -{ - public HashSet UsedFeatures { get; } = new(); - - public void UseFeature(LicenseFeature feature) => UsedFeatures.Add(feature); - - public HashSet UsedClients { get; } = new(); - public void UseClient(string clientId) => UsedClients.Add(clientId); - - public HashSet UsedIssuers { get; } = new(); - public void UseIssuer(string issuer) => UsedIssuers.Add(issuer); -} \ No newline at end of file diff --git a/test/IdentityServer.UnitTests/Common/TestLicenseUsageService.cs b/test/IdentityServer.UnitTests/Common/TestLicenseUsageService.cs new file mode 100644 index 000000000..f919c6e38 --- /dev/null +++ b/test/IdentityServer.UnitTests/Common/TestLicenseUsageService.cs @@ -0,0 +1,23 @@ +// Copyright (c) Duende Software. All rights reserved. +// See LICENSE in the project root for license information. + + +using Duende.IdentityServer.Licensing.v2; +using System.Collections.Generic; + +namespace UnitTests.Common; + +internal class TestLicenseUsageService : ILicenseUsageService +{ + public HashSet BusinessFeaturesUsed { get; } + public HashSet EnterpriseFeaturesUsed { get; } + public HashSet OtherFeaturesUsed { get; } + + public void UseFeature(LicenseFeature feature) { } + + public HashSet UsedClients { get; } = new(); + public void UseClient(string clientId) { } + + public HashSet UsedIssuers { get; } = new(); + public void UseIssuer(string issuer) { } +} \ No newline at end of file diff --git a/test/IdentityServer.UnitTests/Licensing/v2/LicenseUsageTests.cs b/test/IdentityServer.UnitTests/Licensing/v2/LicenseUsageTests.cs index f40138216..59a12a851 100644 --- a/test/IdentityServer.UnitTests/Licensing/v2/LicenseUsageTests.cs +++ b/test/IdentityServer.UnitTests/Licensing/v2/LicenseUsageTests.cs @@ -20,14 +20,32 @@ public LicenseUsageTests() [Fact] public void used_features_are_reported() { + _featureManager.UseFeature(LicenseFeature.KeyManagement); _featureManager.UseFeature(LicenseFeature.PAR); + _featureManager.UseFeature(LicenseFeature.ResourceIsolation); + _featureManager.UseFeature(LicenseFeature.DynamicProviders); + _featureManager.UseFeature(LicenseFeature.CIBA); + _featureManager.UseFeature(LicenseFeature.ServerSideSessions); _featureManager.UseFeature(LicenseFeature.DPoP); - _featureManager.UseFeature(LicenseFeature.KeyManagement); + _featureManager.UseFeature(LicenseFeature.DCR); + _featureManager.UseFeature(LicenseFeature.ISV); + _featureManager.UseFeature(LicenseFeature.Redistribution); - _featureManager.UsedFeatures.Should().Contain(LicenseFeature.PAR); - _featureManager.UsedFeatures.Should().Contain(LicenseFeature.DPoP); - _featureManager.UsedFeatures.Should().Contain(LicenseFeature.KeyManagement); - _featureManager.UsedFeatures.Should().NotContain(LicenseFeature.DynamicProviders); + _featureManager.BusinessFeaturesUsed.Should().Contain(LicenseFeature.KeyManagement); + _featureManager.BusinessFeaturesUsed.Should().Contain(LicenseFeature.PAR); + _featureManager.BusinessFeaturesUsed.Should().Contain(LicenseFeature.ServerSideSessions); + _featureManager.BusinessFeaturesUsed.Should().Contain(LicenseFeature.DCR); + _featureManager.BusinessFeaturesUsed.Should().HaveCount(4); + + _featureManager.EnterpriseFeaturesUsed.Should().Contain(LicenseFeature.ResourceIsolation); + _featureManager.EnterpriseFeaturesUsed.Should().Contain(LicenseFeature.DynamicProviders); + _featureManager.EnterpriseFeaturesUsed.Should().Contain(LicenseFeature.CIBA); + _featureManager.EnterpriseFeaturesUsed.Should().Contain(LicenseFeature.DPoP); + _featureManager.EnterpriseFeaturesUsed.Should().HaveCount(4); + + _featureManager.OtherFeaturesUsed.Should().Contain(LicenseFeature.ISV); + _featureManager.OtherFeaturesUsed.Should().Contain(LicenseFeature.Redistribution); + _featureManager.OtherFeaturesUsed.Should().HaveCount(2); } [Fact] diff --git a/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_Resources.cs b/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_Resources.cs index 3def3816c..c7be6f66b 100644 --- a/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_Resources.cs +++ b/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_Resources.cs @@ -56,7 +56,7 @@ public Authorize_ProtocolValidation_Resources() _mockResourceValidator, _mockUserSession, Factory.CreateRequestObjectValidator(), - new TestFeatureManager(), + new TestLicenseUsageService(), TestLogger.Create()); } diff --git a/test/IdentityServer.UnitTests/Validation/Setup/Factory.cs b/test/IdentityServer.UnitTests/Validation/Setup/Factory.cs index c5838ea0a..7f3b7e956 100644 --- a/test/IdentityServer.UnitTests/Validation/Setup/Factory.cs +++ b/test/IdentityServer.UnitTests/Validation/Setup/Factory.cs @@ -142,7 +142,7 @@ public static TokenRequestValidator CreateTokenRequestValidator( new DefaultDPoPProofValidator(options, new MockReplayCache(), new StubClock(), new StubDataProtectionProvider(), new LoggerFactory().CreateLogger()), new TestEventService(), new StubClock(), - new TestFeatureManager(), + new TestLicenseUsageService(), TestLogger.Create()); } @@ -275,7 +275,7 @@ public static AuthorizeRequestValidator CreateAuthorizeRequestValidator( resourceValidator, userSession, requestObjectValidator, - new TestFeatureManager(), + new TestLicenseUsageService(), TestLogger.Create()); }