Skip to content

Commit

Permalink
Always enable allowClarmsValidator (#4717)
Browse files Browse the repository at this point in the history
Co-authored-by: Dong Lei <donglei@microsoft.com>
  • Loading branch information
luhan2017 and boydc2014 committed Nov 9, 2020
1 parent 952a841 commit 59e1e5f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions runtime/dotnet/azurewebapp/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddSingleton<BotAdapter>(sp => (BotFrameworkHttpAdapter)sp.GetService<IBotFrameworkHttpAdapter>());

// 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());
Expand Down

0 comments on commit 59e1e5f

Please sign in to comment.