Oidc behaviour fixes: remove stale clients at seeding, re-check Active at the token endpoint, pin issuer and parked lifetime by tests, one PKCE owner, drop the unread consent type
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0f377de406
commit
443b0fd4fb
6 changed files with 151 additions and 17 deletions
|
|
@ -5,6 +5,7 @@ using Bifrost.Web.Features.Shared;
|
|||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
|
||||
|
|
@ -216,3 +217,16 @@ public sealed class OidcNoIdentityFactory : OidcWebApplicationFactory
|
|||
}));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>An OIDC host whose public base URL differs from the origin its requests arrive on, so the issuer cannot be request-derived.</summary>
|
||||
public sealed class OidcForeignIssuerFactory : OidcWebApplicationFactory
|
||||
{
|
||||
public const string PublicBaseUrl = "https://id.example.test/";
|
||||
|
||||
protected override void ConfigureWebHost(IWebHostBuilder builder)
|
||||
{
|
||||
base.ConfigureWebHost(builder);
|
||||
builder.ConfigureAppConfiguration((_, configuration) =>
|
||||
configuration.AddInMemoryCollection(new Dictionary<string, string?> { ["Host:PublicBaseUrl"] = PublicBaseUrl }));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue