Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
Update to MSAL 4.46.0. (#188)
Browse files Browse the repository at this point in the history
* Update to MSAL 4.46.0.

* Fix calling correct AcquireTokenByUP

* Fix.
  • Loading branch information
pmaytak authored Aug 4, 2022
1 parent 96dd5bc commit 1e91820
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 20 deletions.
2 changes: 1 addition & 1 deletion sample/ManualTestApp/ManualTestApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Client" Version="4.45.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.46.0" />

<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="5.2.9" />

Expand Down
22 changes: 6 additions & 16 deletions sample/ManualTestApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Security;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Identity.Client;
Expand Down Expand Up @@ -305,20 +303,12 @@ private static async Task<AuthenticationResult> AcquireTokenROPCAsync(
throw new InvalidOperationException("Please configure a username and password!");
}

using (SecureString securePassword = new SecureString())
{
foreach (char c in Config.Password)
{
securePassword.AppendChar(c);
}

return await pca.AcquireTokenByUsernamePassword(
Config.Scopes,
Config.Username,
securePassword)
.ExecuteAsync()
.ConfigureAwait(false);
}
return await pca.AcquireTokenByUsernamePassword(
Config.Scopes,
Config.Username,
Config.Password)
.ExecuteAsync()
.ConfigureAwait(false);
}

private static void DisplayResult(AuthenticationResult result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<Import Project="..\Shared\Shared.projitems" Label="Shared" />

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Client" Version="4.45.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.46.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNetDesktop)'">
Expand Down
2 changes: 1 addition & 1 deletion tests/Automation.TestApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private async static Task WritePayloadToSyncFileAsync(string lockFile, string pr
{
string pid = Process.GetCurrentProcess().Id.ToString(CultureInfo.InvariantCulture);
string errorFile = protectedFile + $"{pid}.e.txt";
string pidFIle = Path.Combine(Path.GetDirectoryName(protectedFile), "finished", pid + ".txt");
string pidFIle = Path.Combine(Path.GetDirectoryName(protectedFile), pid + ".txt");

Console.WriteLine("Starting process: " + pid);
CrossPlatLock crossPlatLock = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Client" Version="4.45.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.46.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
Expand Down

0 comments on commit 1e91820

Please sign in to comment.