Linked accounts page: list, link any admitted provider, unlink with step-up proof
A member sees their Heimdall logins, links Discord, Patreon or Google, and unlinks one with a fresh Google step-up sign-in. Bifrost keeps no Heimdall token: each action is a fresh Heimdall sign-in started by Bifrost whose bearer lives inside the completion request. The list is kept five minutes in this process as non-secret fields only. The Status page's Google-only link button and handler are cut; the Linked accounts page owns link starts. HeimdallStartRequest gains stepUp. Heimdall's member routes use a client without the app secret. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9a716cfd7e
commit
59ecaa606b
16 changed files with 1611 additions and 164 deletions
|
|
@ -93,6 +93,7 @@ builder.Services.AddAntiforgery(options =>
|
|||
builder.Services.AddRazorPages(options =>
|
||||
{
|
||||
options.Conventions.AuthorizePage("/Membership/Status");
|
||||
options.Conventions.AuthorizePage("/Membership/LinkedAccounts");
|
||||
options.Conventions.AuthorizeFolder("/App", ActiveMemberRequirement.PolicyName);
|
||||
options.Conventions.AllowAnonymousToFolder("/Mill");
|
||||
});
|
||||
|
|
@ -153,6 +154,11 @@ builder.Services.AddScoped<IAuthorizationHandler, ActiveMemberAuthorizationHandl
|
|||
builder.Services.AddHttpClient<HeimdallAuthService>((serviceProvider, client) =>
|
||||
HeimdallAuthService.ConfigureClient(client, serviceProvider.GetRequiredService<IOptions<HeimdallOptions>>().Value))
|
||||
.RedactLoggedHeaders(HeimdallAuthService.RedactsHeader);
|
||||
// Heimdall's member routes take only the member's bearer: this client carries no app secret.
|
||||
builder.Services.AddHttpClient<HeimdallMemberClient>((serviceProvider, client) =>
|
||||
HeimdallMemberClient.ConfigureClient(client, serviceProvider.GetRequiredService<IOptions<HeimdallOptions>>().Value))
|
||||
.RedactLoggedHeaders(HeimdallAuthService.RedactsHeader);
|
||||
builder.Services.AddSingleton<LinkedAccountsSnapshots>();
|
||||
builder.Services.AddSingleton<HeimdallTokenVerifier>();
|
||||
builder.Services.AddHttpClient(HeimdallTokenVerifier.ClientName, (serviceProvider, client) =>
|
||||
HeimdallTokenVerifier.ConfigureClient(client, serviceProvider.GetRequiredService<IOptions<HeimdallOptions>>().Value));
|
||||
|
|
|
|||
Loading…
Reference in a new issue