using Microsoft.Extensions.DependencyInjection; namespace GB5Shared.Auth.Jwt { /// /// Registers the multi-tenant JWT Bearer support pieces (MultiTenantOidcJwksCache — a /// singleton, only ever mutates its own cache dictionary). Does NOT call AddAuthentication()/ /// AddJwtBearer() itself — each host wires that in its own Program.cs (same as /// DXP/Recruitment/Entitlement do today), passing MultiTenantJwtBearerEvents.Build() as the /// scheme's Events. Requires IApplicationConnection to already be registered (it is, in every /// host — the same service DB connection resolution already depends on). /// Call once per host: builder.Services.AddGB5MultiTenantJwtBearerSupport(); /// public static class MultiTenantJwtBearerServiceExtensions { public static IServiceCollection AddGB5MultiTenantJwtBearerSupport(this IServiceCollection services) { services.AddSingleton(); return services; } } }