using ZB.MOM.WW.Secrets.Abstractions;
namespace ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient;
///
/// A null-object that resolves every name to null
/// (absent). Backs the driver's default (test/parse-only) construction path so callers that
/// never author a secret: credential ref need not thread a real resolver. A production
/// OpcUaClientDriver always receives the DI-registered resolver via the factory; a
/// secret: ref resolved against this null object throws fail-closed (the secret is
/// reported absent), which is the correct behaviour for a mis-wired deployment — the
/// secret: literal is never sent verbatim as a password.
///
internal sealed class NullSecretResolver : ISecretResolver
{
/// The shared singleton instance.
public static readonly NullSecretResolver Instance = new();
private NullSecretResolver()
{
}
///
public Task GetAsync(SecretName name, CancellationToken ct) =>
Task.FromResult(null);
}