From f9565e058cad94178ec07819b19edfd36467dac3 Mon Sep 17 00:00:00 2001
From: Roberto Bortolussi <1219450+NoDataAvailable@users.noreply.github.com>
Date: Thu, 5 Sep 2024 16:03:40 -0700
Subject: [PATCH] Update Microsoft.Identity.Client(.*) (#513)
---
Directory.Packages.props | 6 +++---
src/Authentication/AzureArtifacts.cs | 21 ++++++-------------
.../Microsoft.Artifacts.Authentication.csproj | 2 +-
3 files changed, 10 insertions(+), 19 deletions(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 15c69391..5cdd53b8 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -10,9 +10,9 @@
-
-
-
+
+
+
diff --git a/src/Authentication/AzureArtifacts.cs b/src/Authentication/AzureArtifacts.cs
index b1efc842..694429aa 100644
--- a/src/Authentication/AzureArtifacts.cs
+++ b/src/Authentication/AzureArtifacts.cs
@@ -36,31 +36,22 @@ public static PublicClientApplicationBuilder CreateDefaultBuilder(Uri authority)
public static PublicClientApplicationBuilder WithBroker(this PublicClientApplicationBuilder builder, bool enableBroker, ILogger logger)
{
// Eventually will be rolled into CreateDefaultBuilder as using the brokers is desirable
- if (!enableBroker)
+ if (!enableBroker || !RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return builder;
}
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- {
- logger.LogTrace(Resources.MsalUsingWamBroker);
+ logger.LogTrace(Resources.MsalUsingWamBroker);
- builder
- .WithBroker(new BrokerOptions(BrokerOptions.OperatingSystems.Windows)
+ return builder
+ .WithBroker(
+ new BrokerOptions(BrokerOptions.OperatingSystems.Windows)
{
Title = "Azure DevOps Artifacts",
ListOperatingSystemAccounts = true,
MsaPassthrough = true
})
- .WithParentActivityOrWindow(() => GetConsoleOrTerminalWindow());
- }
- else
- {
- logger.LogTrace(Resources.MsalUsingBroker);
- builder.WithBroker();
- }
-
- return builder;
+ .WithParentActivityOrWindow(() => GetConsoleOrTerminalWindow());
}
public static PublicClientApplicationBuilder WithHttpClient(this PublicClientApplicationBuilder builder, HttpClient? httpClient = null)
diff --git a/src/Authentication/Microsoft.Artifacts.Authentication.csproj b/src/Authentication/Microsoft.Artifacts.Authentication.csproj
index 27b4e352..cc3a173d 100644
--- a/src/Authentication/Microsoft.Artifacts.Authentication.csproj
+++ b/src/Authentication/Microsoft.Artifacts.Authentication.csproj
@@ -7,7 +7,7 @@
latest
enable
enable
- 0.2.2
+ 0.2.3
Microsoft
Microsoft
Azure Artifacts authentication library for credential providers.