search and ai stabilization work, localization stablized.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using StellaOps.Cryptography;
|
||||
using System;
|
||||
using static StellaOps.Localization.T;
|
||||
|
||||
namespace StellaOps.Configuration;
|
||||
|
||||
@@ -14,27 +15,27 @@ public sealed partial class AuthorityAckTokenOptions
|
||||
|
||||
if (string.IsNullOrWhiteSpace(PayloadType))
|
||||
{
|
||||
throw new InvalidOperationException("notifications.ackTokens.payloadType must be specified when ack tokens are enabled.");
|
||||
throw new InvalidOperationException(_t("config.ack_token.payload_type_required"));
|
||||
}
|
||||
|
||||
if (DefaultLifetime <= TimeSpan.Zero)
|
||||
{
|
||||
throw new InvalidOperationException("notifications.ackTokens.defaultLifetime must be greater than zero.");
|
||||
throw new InvalidOperationException(_t("config.ack_token.default_lifetime_invalid"));
|
||||
}
|
||||
|
||||
if (MaxLifetime <= TimeSpan.Zero || MaxLifetime < DefaultLifetime)
|
||||
{
|
||||
throw new InvalidOperationException("notifications.ackTokens.maxLifetime must be greater than zero and greater than or equal to defaultLifetime.");
|
||||
throw new InvalidOperationException(_t("config.ack_token.max_lifetime_invalid"));
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(ActiveKeyId))
|
||||
{
|
||||
throw new InvalidOperationException("notifications.ackTokens.activeKeyId must be provided when ack tokens are enabled.");
|
||||
throw new InvalidOperationException(_t("config.ack_token.key_id_required"));
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(KeyPath))
|
||||
{
|
||||
throw new InvalidOperationException("notifications.ackTokens.keyPath must be provided when ack tokens are enabled.");
|
||||
throw new InvalidOperationException(_t("config.ack_token.key_path_required"));
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(KeySource))
|
||||
@@ -59,7 +60,7 @@ public sealed partial class AuthorityAckTokenOptions
|
||||
|
||||
if (JwksCacheLifetime <= TimeSpan.Zero || JwksCacheLifetime > TimeSpan.FromHours(1))
|
||||
{
|
||||
throw new InvalidOperationException("notifications.ackTokens.jwksCacheLifetime must be between 00:00:01 and 01:00:00.");
|
||||
throw new InvalidOperationException(_t("config.ack_token.jwks_cache_range"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user