Skip to content

Commit

Permalink
Update Microsoft.Identity.Client(.*) (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoDataAvailable committed Sep 5, 2024
1 parent c1c72e6 commit f9565e0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
<PackageVersion Include="Microsoft.Identity.Client" Version="4.54.1" />
<PackageVersion Include="Microsoft.Identity.Client.Broker" Version="4.54.1" />
<PackageVersion Include="Microsoft.Identity.Client.Extensions.Msal" Version="2.31.0" />
<PackageVersion Include="Microsoft.Identity.Client" Version="4.64.0" />
<PackageVersion Include="Microsoft.Identity.Client.Broker" Version="4.64.0" />
<PackageVersion Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.64.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageVersion Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="1.0.0" />
<PackageVersion Include="Moq" Version="4.18.4" />
Expand Down
21 changes: 6 additions & 15 deletions src/Authentication/AzureArtifacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<VersionPrefix>0.2.2</VersionPrefix>
<VersionPrefix>0.2.3</VersionPrefix>
<Authors>Microsoft</Authors>
<Owners>Microsoft</Owners>
<Description>Azure Artifacts authentication library for credential providers.</Description>
Expand Down

0 comments on commit f9565e0

Please sign in to comment.