Skip to content

Commit

Permalink
user prompt is broken af. removing it.
Browse files Browse the repository at this point in the history
  • Loading branch information
santisq committed Dec 17, 2024
1 parent b9edc1d commit 8cccbe7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
1 change: 1 addition & 0 deletions module/PowerShellKusto.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @(
'Connect-Kusto'
'Invoke-KustoQuery'
)

# Variables to export from this module
Expand Down
13 changes: 1 addition & 12 deletions src/PowerShellKusto/ConnectKustoCommand.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Management.Automation;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
Expand All @@ -8,16 +7,14 @@

namespace PowerShellKusto;

[Cmdlet(VerbsCommunications.Connect, "Kusto")]
[Cmdlet(VerbsCommunications.Connect, "Kusto", DefaultParameterSetName = CredentialSet)]
[OutputType(typeof(void))]
public sealed class ConnectKustoCommand : PSCmdlet
{
private const string CredentialSet = "Credential";

private const string IdentitySet = "Identity";

private const string UserPromptSet = "UserPrompt";

private const string CertificateSet = "Certificate";

private const string CertificateThumbprintSet = "CertificateThumbprint";
Expand All @@ -33,7 +30,6 @@ public sealed class ConnectKustoCommand : PSCmdlet
public string? Database { get; set; }

[Parameter(Mandatory = true, ParameterSetName = CredentialSet)]
[Parameter(ParameterSetName = UserPromptSet)]
[Parameter(Mandatory = true, ParameterSetName = CertificateSet)]
[Parameter(Mandatory = true, ParameterSetName = CertificateThumbprintSet)]
public string? Authority { get; set; }
Expand All @@ -45,9 +41,6 @@ public sealed class ConnectKustoCommand : PSCmdlet
[Parameter(ParameterSetName = IdentitySet)]
public SwitchParameter Identity { get; set; }

[Parameter(ParameterSetName = UserPromptSet)]
public SwitchParameter UserPrompt { get; set; }

[Parameter(Mandatory = true, ParameterSetName = CertificateSet)]
[Parameter(Mandatory = true, ParameterSetName = CertificateThumbprintSet)]
public string AppId { get; set; } = null!;
Expand Down Expand Up @@ -96,10 +89,6 @@ protected override void EndProcessing()
authority: Authority),
RequestProperties),

UserPromptSet => new KustoConnectionDetails(
builder.WithAadUserPromptAuthentication(authority: Authority),
RequestProperties),

CertificateSet => new KustoConnectionDetails(
builder.WithAadApplicationCertificateAuthentication(
applicationClientId: AppId,
Expand Down
3 changes: 1 addition & 2 deletions src/PowerShellKusto/InvokeKustoQueryCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
using Kusto.Cloud.Platform.Data;
using Kusto.Data.Common;
using Kusto.Data.Net.Client;
using Microsoft.PowerShell.Commands;
using Newtonsoft.Json.Linq;

namespace PowerShellKusto;

[Cmdlet(VerbsLifecycle.Invoke, "KustQuery", DefaultParameterSetName = ToJsonSet)]
[Cmdlet(VerbsLifecycle.Invoke, "KustoQuery", DefaultParameterSetName = ToJsonSet)]
[OutputType(typeof(string), ParameterSetName = [ToJsonSet])]
[OutputType(typeof(PSObject), ParameterSetName = [ToEnumerableSet])]
public sealed class InvokeKustoQueryCommand : PSCmdlet
Expand Down

0 comments on commit 8cccbe7

Please sign in to comment.