OIDC issuer: per-address and per-client limits, token-row cap, scheduled prune, marker brake

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Heimdall 2026-11-11 07:56:09 +00:00
commit d0749d4022
5 changed files with 74 additions and 14 deletions

View file

@ -280,10 +280,10 @@ public sealed class OidcSettingsFactory(IReadOnlyDictionary<string, string?> set
public Task PruneAsync() => Services.GetRequiredService<Bifrost.Web.Features.Oidc.OidcPruner>().PruneAsync(CancellationToken.None);
public async Task<long> TokenRowsAsync()
public async Task<int> TokenRowsAsync()
{
using var scope = Services.CreateScope();
return await scope.ServiceProvider.GetRequiredService<OpenIddict.Abstractions.IOpenIddictTokenManager>().CountAsync();
return (int)await scope.ServiceProvider.GetRequiredService<OpenIddict.Abstractions.IOpenIddictTokenManager>().CountAsync();
}
}