Files
velopack/src/vpk/Velopack.Vpk/Commands/Flow/LoginCommandRunner.cs
Kevin Bost b828850b45 Adding flow API command
This provide a hidden Velopack Flow API command. This allows for easier scripting directly against the API as it leveraging the built in auth.
2024-09-16 08:35:32 -06:00

18 lines
485 B
C#

using System.Threading;
using Velopack.Packaging.Abstractions;
using Velopack.Packaging.Flow;
namespace Velopack.Vpk.Commands.Flow;
#nullable enable
public class LoginCommandRunner(IVelopackFlowServiceClient Client) : ICommand<LoginOptions>
{
public async Task Run(LoginOptions options)
{
await Client.LoginAsync(new() {
VelopackBaseUrl = options.VelopackBaseUrl,
ApiKey = options.ApiKey,
}, false, CancellationToken.None);
}
}