From 5cebe52305d9d0e0f8af05196f110d4e9ed7c951 Mon Sep 17 00:00:00 2001 From: Lu Han <32191031+luhan2017@users.noreply.github.com> Date: Mon, 9 Nov 2020 13:44:29 +0800 Subject: [PATCH] Always enable allowClarmsValidator (#4717) Co-authored-by: Dong Lei --- runtime/dotnet/azurewebapp/Startup.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/runtime/dotnet/azurewebapp/Startup.cs b/runtime/dotnet/azurewebapp/Startup.cs index 3157c2e3a6..7cfb1bddb8 100644 --- a/runtime/dotnet/azurewebapp/Startup.cs +++ b/runtime/dotnet/azurewebapp/Startup.cs @@ -131,14 +131,7 @@ public void ConfigureServices(IServiceCollection services) services.AddSingleton(sp => (BotFrameworkHttpAdapter)sp.GetService()); // Register AuthConfiguration to enable custom claim validation for skills. - if (IsSkill(settings)) - { - services.AddSingleton(sp => new AuthenticationConfiguration { ClaimsValidator = new AllowedCallersClaimsValidator(settings.SkillConfiguration) }); - } - else - { - services.AddSingleton(sp => new AuthenticationConfiguration()); - } + services.AddSingleton(sp => new AuthenticationConfiguration { ClaimsValidator = new AllowedCallersClaimsValidator(settings.SkillConfiguration) }); // register components. ComponentRegistration.Add(new DialogsComponentRegistration());