Skip to content

Commit

Permalink
Merge pull request #96 from microsoft/feature/az-cli-auth
Browse files Browse the repository at this point in the history
Add AzCli auth
  • Loading branch information
vplauzon authored May 30, 2022
2 parents eaeb076 + e820c58 commit 6ac2d48
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ private static KustoConnectionStringBuilder CreateKustoConnectionStringBuilder(
tokenProvider.UserPrompt.TenantId,
tokenProvider.UserPrompt.UserId);
}
else if (tokenProvider.AzCli != null)
{
return builder.WithAadAzCliAuthentication(tokenProvider.AzCli.Interactive);
}
else
{
throw new NotSupportedException("Token provider isn't supported");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace DeltaKustoIntegration.Parameterization
{
public class AzCliParameterization
{
public bool Interactive { get; set; }

internal void Validate()
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public class TokenProviderParameterization
public bool SystemManagedIdentity { get; set; } = false;

public UserPromptParameterization? UserPrompt { get; set; }

public AzCliParameterization? AzCli { get; set; }

public UserManagedIdentityParameterization? UserManagedIdentity { get; set; }

Expand Down Expand Up @@ -74,6 +76,10 @@ internal void Validate()
{
UserPrompt.Validate();
}
if (AzCli != null)
{
AzCli.Validate();
}
}
}
}
2 changes: 1 addition & 1 deletion code/delta-kusto/delta-kusto.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>delta_kusto</RootNamespace>
<Nullable>enable</Nullable>
<Version>0.9.0</Version>
<Version>0.10.0</Version>
<!-- Important to avoid the trimming warning hell ; since we automate-test everything, we do not need static analysis -->
<ILLinkTreatWarningsAsErrors>false</ILLinkTreatWarningsAsErrors>
</PropertyGroup>
Expand Down

0 comments on commit 6ac2d48

Please sign in to comment.