-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit for adding aadIssuerValidatorOptions (#696)
* initial commit for adding aadIssuerValidatorOptions * fixing some tests but will add more later * PR feedback. * more updates * fix warning
- Loading branch information
Showing
7 changed files
with
88 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
src/Microsoft.Identity.Web/Resource/AadIssuerValidatorOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
namespace Microsoft.Identity.Web | ||
{ | ||
/// <summary> | ||
/// Options passed-in to create the AadIssuerValidator object. | ||
/// </summary> | ||
public class AadIssuerValidatorOptions | ||
{ | ||
/// <summary> | ||
/// Sets the name of the HttpClient to get from the IHttpClientFactory for use with the configuration manager. | ||
/// Needed when customizing the client such as configuring a proxy. | ||
/// </summary> | ||
public string? HttpClientName { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
tests/Microsoft.Identity.Web.Test/Resource/HttpClientFactoryTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System.Collections.Generic; | ||
using System.Net.Http; | ||
|
||
namespace Microsoft.Identity.Web.Test.Resource | ||
{ | ||
public class HttpClientFactoryTest : IHttpClientFactory | ||
{ | ||
public Dictionary<string, HttpClient> dictionary = new Dictionary<string, HttpClient>(); | ||
|
||
public HttpClient CreateClient(string name) | ||
{ | ||
using SocketsHttpHandler socketsHttpHandler = new SocketsHttpHandler(); | ||
socketsHttpHandler.UseProxy = true; | ||
return new HttpClient(socketsHttpHandler); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters