Files
james.maesandClaude Sonnet 5.5 e4639e3cca chore: integrate printing standards and strict Java compiler checks
Preserve current rendering, operator and retained-source behavior while integrating script quality, meaningful headers and strict Error Prone/NullAway contracts. Production and test compilation and the 189-case verification gate pass with zero failures and one intentional workload skip.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
2026-11-01 16:51:18 -06:00

24 lines
912 B
C#

/*
* Copyright 2026 Kingsrook, LLC
* SPDX-License-Identifier: Apache-2.0
*/
using Printing.Development;
using Qqq.PrintAgent.Core.Authentication;
namespace Printing.NativeAuth;
/// <summary>Requires the pinned experimental native grant before provider authentication.</summary>
internal static class NativeAuthDiscovery
{
/// <summary>Checks actual production discovery without sending credentials.</summary>
internal static async Task DiscoverAsync(QqqSessionClient client, CancellationToken token)
{
QqqApiDiscovery discovery = await WorkloadDiscovery.DiscoverRealtimeAsync(client, token);
if(!string.Equals(discovery.ApiVersion, "1.9.0", StringComparison.Ordinal) || !discovery.Features.Contains("nativeSessionLogin", StringComparer.Ordinal))
{
throw new InvalidOperationException("The actual server did not advertise the pinned native-session API.");
}
}
}