Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSafia Abdalla <safia@microsoft.com>2022-07-07 06:34:45 +0300
committerGitHub <noreply@github.com>2022-07-07 06:34:45 +0300
commit08d17b8fd854a2d467204cba521e810157949b89 (patch)
treede4de8cb062cc1913355cc75295cf004e4fa2753
parent9c14f54cf82d6b99a978cf3ca4ec1dfab9afe548 (diff)
Check for non-scoped servicesaf/rm-wab-auth
-rw-r--r--src/DefaultBuilder/src/WebApplicationBuilder.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/DefaultBuilder/src/WebApplicationBuilder.cs b/src/DefaultBuilder/src/WebApplicationBuilder.cs
index 9b79f39558..d002acd3a5 100644
--- a/src/DefaultBuilder/src/WebApplicationBuilder.cs
+++ b/src/DefaultBuilder/src/WebApplicationBuilder.cs
@@ -172,7 +172,7 @@ public sealed class WebApplicationBuilder
// Process authorization and authentication middlewares independently to avoid
// registering middlewares for services that do not exist
- if (_builtApplication.Services.GetService<IAuthenticationService>() is not null)
+ if (_builtApplication.Services.GetService<IAuthenticationSchemeProvider>() is not null)
{
// Don't add more than one instance of the middleware
if (!_builtApplication.Properties.ContainsKey(AuthenticationMiddlewareSetKey))