using ClaudeDo.Worker.Online.Interfaces;

namespace ClaudeDo.Worker.Online;

/// <summary>
/// Test double: an <see cref="IOnlineAuthProvider"/> that returns a fixed token supplied at
/// construction. Production uses <c>ZitadelAuthProvider</c>.
/// </summary>
public sealed class StaticTokenAuthProvider(string? token = null) : IOnlineAuthProvider
{
    public Task<string?> GetAccessTokenAsync(CancellationToken ct = default)
        => Task.FromResult(token);

    public Task<string?> GetAccessTokenAsync(bool forceRefresh, CancellationToken ct = default)
        => Task.FromResult(token);
}
