Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Have a feature request for MSAL? Complete a [Feature request](https://github.com
### Visual Studio

Use the latest Visual Studio. It will guide you on the components needed to be installed.
For MAUI, edit the .csproj and enable the MAUI targets.
For MAUI, edit the .csproj and enable the mobile targets.

### Package

Expand Down
6 changes: 3 additions & 3 deletions build/pipeline-perf-tests-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pool:
variables:
BuildPlatform: 'any cpu'
BuildConfiguration: 'release'
BuildRuntime: 'net6.0'
BuildRuntime: 'net8.0'

jobs:
- job: 'BuildJob'
Expand All @@ -28,9 +28,9 @@ jobs:
versionSpec: 6.x

- task: UseDotNet@2
displayName: 'Use the latest .NET 6'
displayName: 'Use the latest .NET 8'
inputs:
version: 6.x
version: 8.x

- task: NuGetCommand@2
displayName: 'NuGet restore'
Expand Down
14 changes: 7 additions & 7 deletions build/platform_and_feature_flags.props
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<Project>
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNetCore)' or '$(TargetFramework)' == '$(TargetFrameworkNet6)'">
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNetCore)' or '$(TargetFramework)' == '$(TargetFrameworkNet)'">
<DefineConstants>$(DefineConstants);NET_CORE;SUPPORTS_CONFIDENTIAL_CLIENT;SUPPORTS_CUSTOM_CACHE;SUPPORTS_BROKER;SUPPORTS_WIN32;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet6)'" >
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet)'" >
<DefineConstants>$(DefineConstants);SUPPORTS_SYSTEM_TEXT_JSON</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet6)' or '$(TargetFramework)' == '$(TargetFrameworkNetDesktop462)' or '$(TargetFramework)' == '$(TargetFrameworkNetDesktop472)' or '$(TargetFramework)' == '$(TargetFrameworkNetStandard)'">
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet)' or '$(TargetFramework)' == '$(TargetFrameworkNetDesktop462)' or '$(TargetFramework)' == '$(TargetFrameworkNetDesktop472)' or '$(TargetFramework)' == '$(TargetFrameworkNetStandard)'">
<DefineConstants>$(DefineConstants);SUPPORTS_OTEL;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet6)' or '$(TargetFramework)' == '$(TargetFrameworkNetDesktop472)'">
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet)' or '$(TargetFramework)' == '$(TargetFrameworkNetDesktop472)'">
<DefineConstants>$(DefineConstants);SUPPORTS_MTLS;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet6Android)'">
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNetAndroid)'">
<DefineConstants>$(DefineConstants);ANDROID;SUPPORTS_BROKER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNetDesktop462)' or '$(TargetFramework)' == '$(TargetFrameworkNetDesktop472)'">
<DefineConstants>$(DefineConstants);SUPPORTS_BROKER;SUPPORTS_CONFIDENTIAL_CLIENT;SUPPORTS_CUSTOM_CACHE;SUPPORTS_WIN32</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet6Ios)'">
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNetIos)'">
<DefineConstants>$(DefineConstants);iOS;SUPPORTS_BROKER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNetStandard)'">
<DefineConstants>$(DefineConstants);NETSTANDARD;SUPPORTS_CONFIDENTIAL_CLIENT;SUPPORTS_BROKER;SUPPORTS_CUSTOM_CACHE;SUPPORTS_WIN32;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet6Android)' or '$(TargetFramework)' == '$(TargetFrameworkNet6Ios)'">
<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNetAndroid)' or '$(TargetFramework)' == '$(TargetFrameworkNetIos)'">
<DefineConstants>$(DefineConstants);MOBILE</DefineConstants>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions build/template-OneBranch-CI-libsandsamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ steps:

# Use the latest .NET SDK
- task: UseDotNet@2
displayName: 'Use .Net Core sdk 6.x'
displayName: 'Use .Net Core sdk 8.x'
inputs:
version: 6.x
version: 8.x

# Compute the source directory based on the parameter MsalSourceDir
- task: PowerShell@2
Expand Down
6 changes: 3 additions & 3 deletions build/template-build-and-prep-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ steps:
versionSpec: 6.x

- task: UseDotNet@2
displayName: 'Use the latest .NET 6'
displayName: 'Use the latest .NET 8'
inputs:
version: 6.x
version: 8.x

# Nuget Restore and Build
- template: template-restore-build-libsandsamples.yaml
Expand Down Expand Up @@ -78,7 +78,7 @@ steps:
#dev apps to check
$AppsToCheck = @('MSIX\WPF\bin\Release\',
'MSIX\WPF.Package\bin\AnyCPU\Release\WPF\',
'NetCoreWinFormsWam\bin\Release\net6.0-windows10.0.17763.0\',
'NetCoreWinFormsWam\bin\Release\net8.0-windows10.0.17763.0\',
'NetDesktopWpf\bin\Release\',
'NetFrameworkWam\bin\Release\',
'WAMClassLibrary\bin\Release\',
Expand Down
4 changes: 2 additions & 2 deletions build/template-desktop-unit-and-automation.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
steps:
- task: UseDotNet@2
displayName: 'Use the latest .NET 6'
displayName: 'Use the latest .NET 8'
inputs:
version: 6.x
version: 8.x

- task: DownloadPipelineArtifact@2
displayName: 'Download Drop'
Expand Down
4 changes: 2 additions & 2 deletions build/template-pack-and-sign-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ steps:

# Use the latest .NET SDK
- task: UseDotNet@2
displayName: 'Use the latest .NET 6'
displayName: 'Use the latest .NET 8'
inputs:
version: 6.x
version: 8.x

- task: Bash@3
displayName: Install MAUI
Expand Down
4 changes: 2 additions & 2 deletions build/template-prebuild-code-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ steps:
versionSpec: '16.x'

- task: UseDotNet@2
displayName: 'Use the latest .NET 6'
displayName: 'Use the latest .NET 8'
inputs:
version: 6.x
version: 8.x

- task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@2
displayName: 'Run PoliCheck'
Expand Down
8 changes: 4 additions & 4 deletions build/template-run-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ parameters:
steps:

- task: VSTest@2
displayName: 'Run unit tests (.NET FX)'
displayName: 'Run unit tests NetFwk (vanilla CI)'
condition: and(succeeded(), eq(variables['PipelineType'], 'legacy'))
inputs:
testSelector: 'testAssemblies'
Expand All @@ -20,7 +20,7 @@ steps:
pathtoCustomTestAdapters: 'C:\temp' # Workaround for test failure, as NUnit Test Adapter that gets detected seems to mess something up

- task: VSTest@2
displayName: 'Run unit tests (.NET FX) on OneBranch'
displayName: 'Run unit tests NetFwk on OneBranch'
condition: and(succeeded(), eq(variables['PipelineType'], 'OneBranch'))
inputs:
testSelector: 'testAssemblies'
Expand All @@ -32,10 +32,10 @@ steps:
minimumExpectedTests: '1'

- task: VSTest@2
displayName: 'Run unit tests (.NET 6)'
displayName: 'Run unit tests .NET '
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: '**\Microsoft.Identity.Test.Unit\bin\**\net6.0\Microsoft.Identity.Test.Unit.dll'
testAssemblyVer2: '**\Microsoft.Identity.Test.Unit\bin\**\net8.0\Microsoft.Identity.Test.Unit.dll'
searchFolder: '$(System.DefaultWorkingDirectory)'
runInParallel: true
codeCoverageEnabled: true
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.428",
"version": "8.0.404",
"rollForward": "latestFeature"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Label="NuGet and AssemblyInfo metadata">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ internal static void ValidatePlatformAvailability()
{
#if !SUPPORTS_WIN32
throw new PlatformNotSupportedException(
"EmbeddedWebViewOptions API is only supported on .NET Fx, .NET Core and .NET6 ");
"EmbeddedWebViewOptions API is only supported on .NET Fx, .NET Core and .NET8 ");
#endif
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ internal AuthenticationResult() { }
/// </summary>
/// <remarks>
/// Not all parameters are added here, only the ones that MSAL doesn't interpret itself and only scalars.
/// Not supported on mobile frameworks (e.g. net6-android or net6-ios)
/// Not supported on mobile frameworks (e.g. net8-android or net8-ios)
/// </remarks>
public IReadOnlyDictionary<string, string> AdditionalResponseParameters { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

#if SUPPORTS_SYSTEM_TEXT_JSON
using Microsoft.Identity.Client.Platforms.net6;
using Microsoft.Identity.Client.Platforms.net;
using JsonProperty = System.Text.Json.Serialization.JsonIncludeAttribute;
#else
using Microsoft.Identity.Json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using Microsoft.Identity.Client.Utils;
#if SUPPORTS_SYSTEM_TEXT_JSON
using Microsoft.Identity.Client.Platforms.net6;
using Microsoft.Identity.Client.Platforms.net;
#else
using Microsoft.Identity.Json;
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System;
#if SUPPORTS_SYSTEM_TEXT_JSON
using Microsoft.Identity.Client.Platforms.net6;
using Microsoft.Identity.Client.Platforms.net;
using JsonProperty = System.Text.Json.Serialization.JsonIncludeAttribute;
#else
using Microsoft.Identity.Json;
Expand Down
6 changes: 2 additions & 4 deletions src/client/Microsoft.Identity.Client/ITokenCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ public partial interface ITokenCache
/// See https://aka.ms/msal-net-token-cache-serialization.
/// If you need async/task-based callbacks, please use SetAfterAccessAsync instead.
/// </summary>
/// <param name="afterAccess">Delegate set in order to handle the cache serialization in the case where the <see cref="TokenCache.HasStateChanged"/>
/// member of the cache is <c>true</c></param>
/// <param name="afterAccess">Delegate set in order to handle the cache serialization</param>
/// <remarks>In the case where the delegate is used to serialize the cache entirely (not just a row), it might
/// want to call <see cref="ITokenCacheSerializer.SerializeMsalV3()"/></remarks>
#if !SUPPORTS_CUSTOM_CACHE
Expand Down Expand Up @@ -89,8 +88,7 @@ public partial interface ITokenCache
/// See https://aka.ms/msal-net-token-cache-serialization.
/// This provides the same functionality as SetAfterAccess but it provides for an async/task-based callback.
/// </summary>
/// <param name="afterAccess">Delegate set in order to handle the cache serialization in the case where the <see cref="TokenCache.HasStateChanged"/>
/// member of the cache is <c>true</c></param>
/// <param name="afterAccess">Delegate set in order to handle the cache serialization </param>
/// <remarks>In the case where the delegate is used to serialize the cache entirely (not just a row), it might
/// want to call <see cref="ITokenCacheSerializer.SerializeMsalV3()"/></remarks>
#if !SUPPORTS_CUSTOM_CACHE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

#if SUPPORTS_SYSTEM_TEXT_JSON
using Microsoft.Identity.Client.Platforms.net6;
using Microsoft.Identity.Client.Platforms.net;
using JsonProperty = System.Text.Json.Serialization.JsonPropertyNameAttribute;
#else
using Microsoft.Identity.Json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using Microsoft.Identity.Client.OAuth2;
#if SUPPORTS_SYSTEM_TEXT_JSON
using Microsoft.Identity.Client.Platforms.net6;
using Microsoft.Identity.Client.Platforms.net;
using JsonProperty = System.Text.Json.Serialization.JsonPropertyNameAttribute;
#else
using Microsoft.Identity.Json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Text;
using System.Threading.Tasks;
#if SUPPORTS_SYSTEM_TEXT_JSON
using Microsoft.Identity.Client.Platforms.net6;
using Microsoft.Identity.Client.Platforms.net;
using JsonProperty = System.Text.Json.Serialization.JsonPropertyNameAttribute;
#else
using Microsoft.Identity.Json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Collections.Generic;
#if SUPPORTS_SYSTEM_TEXT_JSON
using Microsoft.Identity.Client.Platforms.net6;
using Microsoft.Identity.Client.Platforms.net;
using JsonProperty = System.Text.Json.Serialization.JsonPropertyNameAttribute;
#else
using Microsoft.Identity.Json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Collections.Generic;
using Microsoft.Identity.Client.OAuth2;
#if SUPPORTS_SYSTEM_TEXT_JSON
using Microsoft.Identity.Client.Platforms.net6;
using Microsoft.Identity.Client.Platforms.net;
using System.Text.Json.Nodes;
using JsonProperty = System.Text.Json.Serialization.JsonPropertyNameAttribute;
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Globalization;
using Microsoft.Identity.Client.Utils;
#if SUPPORTS_SYSTEM_TEXT_JSON
using Microsoft.Identity.Client.Platforms.net6;
using Microsoft.Identity.Client.Platforms.net;
using JsonProperty = System.Text.Json.Serialization.JsonPropertyNameAttribute;
#else
using Microsoft.Identity.Json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Identity.Client.OAuth2;
#if SUPPORTS_SYSTEM_TEXT_JSON
using System.Text.Json.Serialization;
using Microsoft.Identity.Client.Platforms.net6;
using Microsoft.Identity.Client.Platforms.net;
using JsonProperty = System.Text.Json.Serialization.JsonPropertyNameAttribute;
#else
using Microsoft.Identity.Json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private static string ComputeCertThumbprint(X509Certificate2 certificate, bool u
{
if (useSha2)
{
#if NET6_0_OR_GREATER
#if NET8_0_OR_GREATER

thumbprint = Base64UrlHelpers.Encode(certificate.GetCertHash(HashAlgorithmName.SHA256));
#else
Expand Down
5 changes: 1 addition & 4 deletions src/client/Microsoft.Identity.Client/LogCallback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ namespace Microsoft.Identity.Client
/// <param name="level">Log level of the log message to process</param>
/// <param name="message">Pre-formatted log message</param>
/// <param name="containsPii">Indicates if the log message contains Organizational Identifiable Information (OII)
/// or Personally Identifiable Information (PII) nor not.
/// If <see cref="Logger.PiiLoggingEnabled"/> is set to <c>false</c> then this value is always false.
/// Otherwise it will be <c>true</c> when the message contains PII.</param>
/// <seealso cref="Logger"/>
/// or Personally Identifiable Information (PII) nor not.</param>
public delegate void LogCallback(LogLevel level, string message, bool containsPii);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System;
#if SUPPORTS_SYSTEM_TEXT_JSON
using Microsoft.Identity.Client.Platforms.net6;
using Microsoft.Identity.Client.Platforms.net;
using JsonProperty = System.Text.Json.Serialization.JsonPropertyNameAttribute;
#else
using Microsoft.Identity.Json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System;
#if SUPPORTS_SYSTEM_TEXT_JSON
using Microsoft.Identity.Client.Platforms.net6;
using Microsoft.Identity.Client.Platforms.net;
using JsonProperty = System.Text.Json.Serialization.JsonPropertyNameAttribute;
#else
using Microsoft.Identity.Json;
Expand Down
Loading
Loading