TsgcWSAPIKeyManager › Properties › Rotation
Grace-period and auto-rotate settings that let a new key replace an old one without downtime.
property Rotation: TsgcAPIKeyRotation read FRotation write SetRotation;
—
Makes key rotation transparent to the customer. RotateKey issues a fresh key for the same owner and scopes and marks the old one kksRotated; during the GracePeriodSec window (24 hours by default) both the old and the new key validate, so the customer can roll the change through their infrastructure without downtime. When AutoRotateDays is > 0 the background sweep rotates keys older than that threshold automatically, and NotifyBeforeExpirySec fires OnKeyExpired early (7 days by default) so you can email the customer before anything actually breaks. Enabled := False disables both the grace period and the auto-rotate sweep.
// 24h grace period, auto-rotate keys older than 90 days, notify 7 days ahead
sgcWSAPIKeyManager1.Rotation.Enabled := True;
sgcWSAPIKeyManager1.Rotation.GracePeriodSec := 86400;
sgcWSAPIKeyManager1.Rotation.AutoRotateDays := 90;
sgcWSAPIKeyManager1.Rotation.NotifyBeforeExpirySec := 7 * 86400;