From b1e8d37f2106d2df5ff0396773579b4731c8c8a9 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sun, 12 Jul 2026 06:45:00 +0100 Subject: [PATCH] blogs: use centralized JWT audience handling --- src/Yavsc.Blogs/Program.cs | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/Yavsc.Blogs/Program.cs b/src/Yavsc.Blogs/Program.cs index 450a1c72..742c9eee 100644 --- a/src/Yavsc.Blogs/Program.cs +++ b/src/Yavsc.Blogs/Program.cs @@ -43,22 +43,9 @@ internal class Program throw new Exception("Site:Authority is not configured in appsettings.json"); } - - foreach (var audience in builder.Configuration.GetValue("Site:Audience")) - { - if (string.IsNullOrEmpty(audience)) - { - throw new Exception("Site:Audience is not configured in appsettings.json"); - } - // AuthenticationBuilder - services.AddAuthentication("Bearer") - .AddYavscJwtBearer(builder.Configuration, - options => - { - options.Authority = authority; - options.Audience = audience; - }); - } + // AuthenticationBuilder + services.AddAuthentication("Bearer") + .AddYavscJwtBearer(builder.Configuration); // DbContextBuilder