Skip to content

Commit

Permalink
modify authenticationType check
Browse files Browse the repository at this point in the history
  • Loading branch information
David Coe committed Feb 22, 2024
1 parent 73f3b95 commit 339e0af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions csharp/src/Drivers/BigQuery/BigQueryConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ internal void Open()
if (!this.properties.TryGetValue(BigQueryParameters.ProjectId, out projectId))
throw new ArgumentException($"The {BigQueryParameters.ProjectId} parameter is not present");

if (this.properties.ContainsKey(BigQueryParameters.AuthenticationType))
if (this.properties.TryGetValue(BigQueryParameters.AuthenticationType, out string? newAuthenticationType))
{
authenticationType = this.properties[BigQueryParameters.AuthenticationType];
if (!string.IsNullOrEmpty(newAuthenticationType))
authenticationType = newAuthenticationType;

if (!authenticationType.Equals(BigQueryConstants.UserAuthenticationType, StringComparison.OrdinalIgnoreCase) &&
!authenticationType.Equals(BigQueryConstants.ServiceAccountAuthenticationType, StringComparison.OrdinalIgnoreCase))
Expand Down

0 comments on commit 339e0af

Please sign in to comment.