Skip to content

Commit 544e885

Browse files
draft
1 parent 36fb5f5 commit 544e885

28 files changed

+480
-5
lines changed

Microsoft.Identity.Web.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Identity.Web.Oidc
164164
EndProject
165165
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Identity.Web.UI.Test", "tests\Microsoft.Identity.Web.UI.Test\Microsoft.Identity.Web.UI.Test.csproj", "{CF31F33A-E5F5-DB57-4FEF-81BDAFD497C8}"
166166
EndProject
167+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "daemon-app-msi", "tests\DevApps\daemon-app\daemon-app-msi\daemon-app-msi.csproj", "{A8181404-23E0-D38B-454C-D16ECDB18B9F}"
168+
EndProject
167169
Global
168170
GlobalSection(SolutionConfigurationPlatforms) = preSolution
169171
Debug|Any CPU = Debug|Any CPU
@@ -387,6 +389,10 @@ Global
387389
{CF31F33A-E5F5-DB57-4FEF-81BDAFD497C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
388390
{CF31F33A-E5F5-DB57-4FEF-81BDAFD497C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
389391
{CF31F33A-E5F5-DB57-4FEF-81BDAFD497C8}.Release|Any CPU.Build.0 = Release|Any CPU
392+
{A8181404-23E0-D38B-454C-D16ECDB18B9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
393+
{A8181404-23E0-D38B-454C-D16ECDB18B9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
394+
{A8181404-23E0-D38B-454C-D16ECDB18B9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
395+
{A8181404-23E0-D38B-454C-D16ECDB18B9F}.Release|Any CPU.Build.0 = Release|Any CPU
390396
EndGlobalSection
391397
GlobalSection(SolutionProperties) = preSolution
392398
HideSolutionNode = FALSE
@@ -461,6 +467,7 @@ Global
461467
{E927D215-A96C-626C-9A1A-CF99876FE7B4} = {45B20A78-91F8-4DD2-B9AD-F12D3A93536C}
462468
{8DA7A2C6-00D4-4CF1-8145-448D7B7B4E5A} = {1DDE1AAC-5AE6-4725-94B6-A26C58D3423F}
463469
{CF31F33A-E5F5-DB57-4FEF-81BDAFD497C8} = {B4E72F1C-603F-437C-AAA1-153A604CD34A}
470+
{A8181404-23E0-D38B-454C-D16ECDB18B9F} = {E37CDBC1-18F6-4C06-A3EE-532C9106721F}
464471
EndGlobalSection
465472
GlobalSection(ExtensibilityGlobals) = postSolution
466473
SolutionGuid = {104367F1-CE75-4F40-B32F-F14853973187}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using System.Net.Http;
5+
using Microsoft.Identity.Client;
6+
7+
namespace Microsoft.Identity.Web
8+
{
9+
/// <summary>
10+
/// **TEST-ONLY hook** – unit-tests can inject a custom
11+
/// <see cref="IMsalHttpClientFactory"/> so that MSAL’s Managed-Identity
12+
/// pipeline uses a mocked <see cref="HttpClient"/> instead of making
13+
/// real network calls.
14+
/// </summary>
15+
internal static class ManagedIdentityTestHooks
16+
{
17+
internal static IMsalHttpClientFactory? HttpClientFactoryOverride { get; set; }
18+
}
19+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Microsoft.Identity.Web.ManagedIdentityTestHooks
2+
static Microsoft.Identity.Web.ManagedIdentityTestHooks.HttpClientFactoryOverride.get -> Microsoft.Identity.Client.IMsalHttpClientFactory?
3+
static Microsoft.Identity.Web.ManagedIdentityTestHooks.HttpClientFactoryOverride.set -> void
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
static Microsoft.Identity.Web.TestOnly.TokenAcquirerFactoryTesting.UseTestHttpClientFactory(Microsoft.Identity.Client.IMsalHttpClientFactory! factory) -> void
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Microsoft.Identity.Web.ManagedIdentityTestHooks
2+
static Microsoft.Identity.Web.ManagedIdentityTestHooks.HttpClientFactoryOverride.get -> Microsoft.Identity.Client.IMsalHttpClientFactory?
3+
static Microsoft.Identity.Web.ManagedIdentityTestHooks.HttpClientFactoryOverride.set -> void
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
static Microsoft.Identity.Web.TestOnly.TokenAcquirerFactoryTesting.UseTestHttpClientFactory(Microsoft.Identity.Client.IMsalHttpClientFactory! factory) -> void
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Microsoft.Identity.Web.ManagedIdentityTestHooks
2+
static Microsoft.Identity.Web.ManagedIdentityTestHooks.HttpClientFactoryOverride.get -> Microsoft.Identity.Client.IMsalHttpClientFactory?
3+
static Microsoft.Identity.Web.ManagedIdentityTestHooks.HttpClientFactoryOverride.set -> void
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
static Microsoft.Identity.Web.TestOnly.TokenAcquirerFactoryTesting.UseTestHttpClientFactory(Microsoft.Identity.Client.IMsalHttpClientFactory! factory) -> void
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Microsoft.Identity.Web.ManagedIdentityTestHooks
2+
static Microsoft.Identity.Web.ManagedIdentityTestHooks.HttpClientFactoryOverride.get -> Microsoft.Identity.Client.IMsalHttpClientFactory?
3+
static Microsoft.Identity.Web.ManagedIdentityTestHooks.HttpClientFactoryOverride.set -> void
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
static Microsoft.Identity.Web.TestOnly.TokenAcquirerFactoryTesting.UseTestHttpClientFactory(Microsoft.Identity.Client.IMsalHttpClientFactory! factory) -> void

0 commit comments

Comments
 (0)