// -------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Health.Client.Authentication;
namespace Microsoft.Health.Client.UnitTests;
internal sealed class TestCredentialProvider : CredentialProvider
{
public TestCredentialProvider(string encodedToken = null)
{
EncodedToken = encodedToken;
}
public string EncodedToken { get; set; }
protected override Task<string> BearerTokenFunction(CancellationToken cancellationToken)
{
return Task.FromResult(EncodedToken);
}
}microsoft/healthcare-shared-components
Publicmirrored from https://github.com/microsoft/healthcare-shared-componentsAvailable
src/Microsoft.Health.Client.UnitTests/TestCredentialProvider.cs
25lines · modepreview