// Copyright (c) Microsoft. All rights reserved.
//
// Licensed under the MIT license.
using System;
using System.Threading;
using System.Threading.Tasks;
using NuGet.Protocol.Plugins;
namespace NuGetCredentialProvider.CredentialProviders
{
///
/// Represents an interface for implementation of credential providers.
///
internal interface ICredentialProvider : IDisposable
{
///
/// Determines whether this implementation can provide credentials for the specified .
///
/// The of the package feed.
/// true if this implementation can provide credentials, otherwise false.
Task CanProvideCredentialsAsync(Uri uri);
///
/// Handles a .
///
/// A object containing details about the request.
/// A used for signaling cancellation.
/// A object containg details about a response.
Task HandleRequestAsync(GetAuthenticationCredentialsRequest request, CancellationToken cancellationToken);
bool IsCachable { get; }
}
}