From ce592267b1456cc3400b01c71a28942141b82a6a Mon Sep 17 00:00:00 2001 From: Joe DeCock Date: Wed, 11 Dec 2024 12:20:39 -0600 Subject: [PATCH] Update trial mode warning language --- src/IdentityServer/Licensing/V2/ProtocolRequestCounter.cs | 2 +- test/IdentityServer.IntegrationTests/Hosting/LicenseTests.cs | 2 +- .../Licensing/v2/ProtocolRequestCounterTests.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/IdentityServer/Licensing/V2/ProtocolRequestCounter.cs b/src/IdentityServer/Licensing/V2/ProtocolRequestCounter.cs index e282aa027..699f9b2bc 100644 --- a/src/IdentityServer/Licensing/V2/ProtocolRequestCounter.cs +++ b/src/IdentityServer/Licensing/V2/ProtocolRequestCounter.cs @@ -34,7 +34,7 @@ internal void Increment() { return; } - _logger.LogError("IdentityServer has handled {total} protocol requests without a license. In future versions, unlicensed IdentityServer instances will shut down after {threshold} protocol requests. Please contact sales to obtain a license. If you are running in a test environment, please use a test license", total, Threshold); + _logger.LogError($"You are using IdentityServer in trial mode and have exceeded the trial threshold of {Threshold} requests handled by IdentityServer. In a future version, you will need to restart the server or configure a license key to continue testing. For more information, please see https://docs.duendesoftware.com/trial-mode."); _warned = true; } } diff --git a/test/IdentityServer.IntegrationTests/Hosting/LicenseTests.cs b/test/IdentityServer.IntegrationTests/Hosting/LicenseTests.cs index 8793a15b7..6af4e2c58 100644 --- a/test/IdentityServer.IntegrationTests/Hosting/LicenseTests.cs +++ b/test/IdentityServer.IntegrationTests/Hosting/LicenseTests.cs @@ -80,6 +80,6 @@ public async Task unlicensed_protocol_requests_log_a_warning() } _mockPipeline.MockLogger.LogMessages.Should().Contain( - $"IdentityServer has handled {threshold + 1} protocol requests without a license. In future versions, unlicensed IdentityServer instances will shut down after {threshold} protocol requests. Please contact sales to obtain a license. If you are running in a test environment, please use a test license"); + $"You are using IdentityServer in trial mode and have exceeded the trial threshold of {threshold} requests handled by IdentityServer. In a future version, you will need to restart the server or configure a license key to continue testing. For more information, please see https://docs.duendesoftware.com/trial-mode."); } } \ No newline at end of file diff --git a/test/IdentityServer.UnitTests/Licensing/v2/ProtocolRequestCounterTests.cs b/test/IdentityServer.UnitTests/Licensing/v2/ProtocolRequestCounterTests.cs index 593e8a457..692cd8336 100644 --- a/test/IdentityServer.UnitTests/Licensing/v2/ProtocolRequestCounterTests.cs +++ b/test/IdentityServer.UnitTests/Licensing/v2/ProtocolRequestCounterTests.cs @@ -42,7 +42,7 @@ public void warning_is_logged_once_after_too_many_protocol_requests_are_handled( _logger.Collector.GetSnapshot().Should() .ContainSingle(r => r.Message == - $"IdentityServer has handled {_counter.Threshold + 1} protocol requests without a license. In future versions, unlicensed IdentityServer instances will shut down after {_counter.Threshold} protocol requests. Please contact sales to obtain a license. If you are running in a test environment, please use a test license"); + $"You are using IdentityServer in trial mode and have exceeded the trial threshold of {_counter.Threshold} requests handled by IdentityServer. In a future version, you will need to restart the server or configure a license key to continue testing. For more information, please see https://docs.duendesoftware.com/trial-mode."); } [Fact] @@ -57,6 +57,6 @@ public void warning_is_not_logged_before_too_many_protocol_requests_are_handled( _logger.Collector.GetSnapshot().Should() .NotContain(r => r.Message == - $"IdentityServer has handled {_counter.Threshold + 1} protocol requests without a license. In future versions, unlicensed IdentityServer instances will shut down after {_counter.Threshold} protocol requests. Please contact sales to obtain a license. If you are running in a test environment, please use a test license"); + $"You are using IdentityServer in trial mode and have exceeded the trial threshold of {_counter.Threshold} requests handled by IdentityServer. In a future version, you will need to restart the server or configure a license key to continue testing. For more information, please see https://docs.duendesoftware.com/trial-mode."); } }