From 05afae75407ec0af2c3f6f4b3af561463b57bb7f Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Tue, 29 Mar 2022 10:59:57 -0700 Subject: [PATCH] Avoid downloading OIDC config --- .../OpenIdConnectMiddlewareTests.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/Microsoft.Owin.Security.Tests/OpenIdConnect/OpenIdConnectMiddlewareTests.cs b/tests/Microsoft.Owin.Security.Tests/OpenIdConnect/OpenIdConnectMiddlewareTests.cs index e93cd71e..2da5d496 100644 --- a/tests/Microsoft.Owin.Security.Tests/OpenIdConnect/OpenIdConnectMiddlewareTests.cs +++ b/tests/Microsoft.Owin.Security.Tests/OpenIdConnect/OpenIdConnectMiddlewareTests.cs @@ -27,11 +27,15 @@ public async Task ChallengeIncludesPkceIfRequested(bool include) { var options = new OpenIdConnectAuthenticationOptions() { - Authority = "https://demo.identityserver.io", + Authority = "https://authserver/", ClientId = "Test Client Id", ClientSecret = "Test Client Secret", UsePkce = include, - ResponseType = OpenIdConnectResponseType.Code + ResponseType = OpenIdConnectResponseType.Code, + Configuration = new OpenIdConnectConfiguration() + { + AuthorizationEndpoint = "https://authserver/auth" + } }; var server = CreateServer( app => app.UseOpenIdConnectAuthentication(options), @@ -67,11 +71,15 @@ public async Task ChallengeDoesNotIncludePkceForOtherResponseTypes(string respon { var options = new OpenIdConnectAuthenticationOptions() { - Authority = "https://demo.identityserver.io", + Authority = "https://authserver/", ClientId = "Test Client Id", ClientSecret = "Test Client Secret", UsePkce = true, - ResponseType = responseType + ResponseType = responseType, + Configuration = new OpenIdConnectConfiguration() + { + AuthorizationEndpoint = "https://authserver/auth" + } }; var server = CreateServer( app => app.UseOpenIdConnectAuthentication(options),