From c295d1d463e7d4e37adb4e5b3ce3148e770bfbe3 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 450a1c72f..742c9eeee 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