blogs: use centralized JWT audience handling
Some checks failed
Dotnet build and test / log-the-inputs (pull_request) Has been cancelled
Dotnet build and test / build (pull_request) Has been cancelled

This commit is contained in:
Paul Schneider 2026-07-12 06:45:00 +01:00
commit b1e8d37f21

View file

@ -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<string[]>("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;
});
}
.AddYavscJwtBearer(builder.Configuration);
// DbContextBuilder